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 @@ #include #include #include +#include "log.h" #include "sway/commands.h" #include "sway/config.h" #include "sway/input/seat.h" @@ -69,5 +70,10 @@ struct cmd_results *seat_cmd_idle_wake(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "Invalid idle source"); } config->handler_context.seat_config->idle_wake_sources = sources; + sway_log(SWAY_INFO, "Warning: seat idle_wake is deprecated"); + if (config->reading) { + config_add_swaynag_warning("seat idle_wake is deprecated. " + "Only seat idle_inhibit is supported."); + } return cmd_results_new(CMD_SUCCESS, NULL); } 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) { void seat_idle_notify_activity(struct sway_seat *seat, enum sway_input_idle_source source) { - uint32_t mask = seat->idle_inhibit_sources; - struct wlr_idle_timeout *timeout; - int ntimers = 0, nidle = 0; - wl_list_for_each(timeout, &server.idle->idle_timers, link) { - ++ntimers; - if (timeout->idle_state) { - ++nidle; - } - } - if (nidle == ntimers) { - mask = seat->idle_wake_sources; - } - if ((source & mask) > 0) { - wlr_idle_notify_activity(server.idle, seat->wlr_seat); - wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); + if ((source & seat->idle_inhibit_sources) == 0) { + return; } + wlr_idle_notify_activity(server.idle, seat->wlr_seat); + wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); } /** 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. "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", and "switch". The default behavior is to prevent idle on any event. -*seat* idle_wake - Sets the set of input event sources which can wake the seat from - its idle state, as a space separated list of source names. Valid names are - "keyboard", "pointer", "touchpad", "touch", "tablet_pad", "tablet_tool", - and "switch". The default behavior is to wake from idle on any event. - *seat* keyboard_grouping none|smart Set how the keyboards in the seat are grouped together. Currently, there are two options. _none_ will disable all keyboard grouping. This will make