diff options
-rw-r--r-- | sway/commands/seat/idle.c | 6 | ||||
-rw-r--r-- | sway/input/seat.c | 19 | ||||
-rw-r--r-- | sway/sway-input.5.scd | 6 |
3 files changed, 10 insertions, 21 deletions
diff --git a/sway/commands/seat/idle.c b/sway/commands/seat/idle.c index 82428f2c..62b94db2 100644 --- a/sway/commands/seat/idle.c +++ b/sway/commands/seat/idle.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <strings.h> | 4 | #include <strings.h> |
5 | #include <stdint.h> | 5 | #include <stdint.h> |
6 | #include "log.h" | ||
6 | #include "sway/commands.h" | 7 | #include "sway/commands.h" |
7 | #include "sway/config.h" | 8 | #include "sway/config.h" |
8 | #include "sway/input/seat.h" | 9 | #include "sway/input/seat.h" |
@@ -69,5 +70,10 @@ struct cmd_results *seat_cmd_idle_wake(int argc, char **argv) { | |||
69 | return cmd_results_new(CMD_FAILURE, "Invalid idle source"); | 70 | return cmd_results_new(CMD_FAILURE, "Invalid idle source"); |
70 | } | 71 | } |
71 | config->handler_context.seat_config->idle_wake_sources = sources; | 72 | config->handler_context.seat_config->idle_wake_sources = sources; |
73 | sway_log(SWAY_INFO, "Warning: seat idle_wake is deprecated"); | ||
74 | if (config->reading) { | ||
75 | config_add_swaynag_warning("seat idle_wake is deprecated. " | ||
76 | "Only seat idle_inhibit is supported."); | ||
77 | } | ||
72 | return cmd_results_new(CMD_SUCCESS, NULL); | 78 | return cmd_results_new(CMD_SUCCESS, NULL); |
73 | } | 79 | } |
diff --git a/sway/input/seat.c b/sway/input/seat.c index 82f4eb5f..a84e4d52 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -100,22 +100,11 @@ void seat_destroy(struct sway_seat *seat) { | |||
100 | 100 | ||
101 | void seat_idle_notify_activity(struct sway_seat *seat, | 101 | void seat_idle_notify_activity(struct sway_seat *seat, |
102 | enum sway_input_idle_source source) { | 102 | enum sway_input_idle_source source) { |
103 | uint32_t mask = seat->idle_inhibit_sources; | 103 | if ((source & seat->idle_inhibit_sources) == 0) { |
104 | struct wlr_idle_timeout *timeout; | 104 | return; |
105 | int ntimers = 0, nidle = 0; | ||
106 | wl_list_for_each(timeout, &server.idle->idle_timers, link) { | ||
107 | ++ntimers; | ||
108 | if (timeout->idle_state) { | ||
109 | ++nidle; | ||
110 | } | ||
111 | } | ||
112 | if (nidle == ntimers) { | ||
113 | mask = seat->idle_wake_sources; | ||
114 | } | ||
115 | if ((source & mask) > 0) { | ||
116 | wlr_idle_notify_activity(server.idle, seat->wlr_seat); | ||
117 | wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); | ||
118 | } | 105 | } |
106 | wlr_idle_notify_activity(server.idle, seat->wlr_seat); | ||
107 | wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); | ||
119 | } | 108 | } |
120 | 109 | ||
121 | /** | 110 | /** |
diff --git a/sway/sway-input.5.scd b/sway/sway-input.5.scd index 082b68c2..8a1f2700 100644 --- a/sway/sway-input.5.scd +++ b/sway/sway-input.5.scd | |||
@@ -268,12 +268,6 @@ correct seat. | |||
268 | "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", | 268 | "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", |
269 | and "switch". The default behavior is to prevent idle on any event. | 269 | and "switch". The default behavior is to prevent idle on any event. |
270 | 270 | ||
271 | *seat* <name> idle_wake <sources...> | ||
272 | Sets the set of input event sources which can wake the seat from | ||
273 | its idle state, as a space separated list of source names. Valid names are | ||
274 | "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", | ||
275 | and "switch". The default behavior is to wake from idle on any event. | ||
276 | |||
277 | *seat* <name> keyboard_grouping none|smart | 271 | *seat* <name> keyboard_grouping none|smart |
278 | Set how the keyboards in the seat are grouped together. Currently, there | 272 | Set how the keyboards in the seat are grouped together. Currently, there |
279 | are two options. _none_ will disable all keyboard grouping. This will make | 273 | are two options. _none_ will disable all keyboard grouping. This will make |