aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/seat
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-07-12 10:14:15 +0200
committerSimon Ser <contact@emersion.fr>2023-07-19 09:28:33 +0200
commitee4637b086aed256c7698b9f68786e6de5d8da00 (patch)
treec55e185db2dd3be42484d24dd6edfe34906a0108 /sway/commands/seat
parenta34d785a26c9180de62530593b6693ca4c0b3615 (diff)
Deprecate seat idle_wake
Sway has two knobs to control idling: - seat idle_inhibit: when the seat is active (ie. not idle), this extends the active state. When the seat is idle, this is ignored. - seat idle_wake: when the seat is idle, this wakes up the seat. When the seat is active, this is ignored. The motivation for the deprecation is two-fold: - The concept of "seat idle state" is ill-defined. Each idle-notify-v1 client will pass a different idle timeout. With the old logic, a seat was declared idle if and only if all idle-notify-v1 timeouts have expired. However, if only a portion of the timeouts have expired, then some clients would wake up, and the rest would stay active. This is inconsistent with the definition of idle_inhibit/idle_wake: idle_inhibit was used for clients which are waking up. - It never worked properly with the new idle-notify-v1 protocol and no-one noticed. Only the legacy KDE idle protocol is taken into account, but that protocol is not used anymore.
Diffstat (limited to 'sway/commands/seat')
-rw-r--r--sway/commands/seat/idle.c6
1 files changed, 6 insertions, 0 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 @@
#include <string.h>
#include <strings.h>
#include <stdint.h>
+#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);
}