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 committed by Alexander Orzechowski
parent e32bdaa7be
commit b04f4136bc
2 changed files with 25 additions and 9 deletions

View file

@ -135,6 +135,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;