aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2024-11-17 12:38:32 +0100
committerSimon Ser <contact@emersion.fr>2024-11-28 20:40:23 +0100
commitb072958b49b3931957291819ec3c82ad6c9eb5b8 (patch)
treee1bb9921dabc2a8403e3a865c221f1306d6db893 /include
parent27d4f15516c15599d61e45602e9698ca1532e64e (diff)
ipc-server: Force modeset if needed after executing commands
IPC clients generally expect executed commands to have taken effect when the command completes, while delayed modeset means that it can take several milliseconds more before e.g. an output is enabled. However, modesetting on every output command in the IPC call could on systems with already slow modesetting behavior lead to an unresponsive system for a not insignificant period of time. To strike a balance, force modeset once all the commands of this IPC call have executed if a modeset is pending. (cherry picked from commit a2c73c9b8b426417e0253ea0420b98298af1c963)
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 013853c8..bb770c6f 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -706,6 +706,7 @@ void free_output_config(struct output_config *oc);
void request_modeset(void);
void force_modeset(void);
+bool modeset_is_pending(void);
bool spawn_swaybg(void);