desktop/output: Debounce modesets

Output changes often happen in rapid succession. Instead of doing the
modesets one by one, set a 10 millisecond debounce timer.
This commit is contained in:
Kenny Levinsen 2024-03-28 00:34:30 +01:00
parent 2686afb95c
commit cc8f9ff6f6
2 changed files with 25 additions and 9 deletions

View file

@ -133,6 +133,8 @@ struct sway_server {
// Stores the nodes that have been marked as "dirty" and will be put into
// the pending transaction.
list_t *dirty_nodes;
struct wl_event_source *delayed_modeset;
};
extern struct sway_server server;