server: cancel pending auto-raise on config reload

If the user disables raiseOnFocus or lowers raiseOnFocusDelay while
a raise is queued, the queued raise should not fire against the new
config. Cancel it in reload_config_and_theme() before rereading the
rc.xml.
This commit is contained in:
Jos Dehaes 2026-04-15 14:36:56 +02:00 committed by Johan Malm
parent ecc5565686
commit 9661ed4285

View file

@ -89,6 +89,12 @@ reload_config_and_theme(void)
/* Avoid UAF when dialog client is used during reconfigure */
action_prompts_destroy();
/*
* Cancel any pending auto-raise before reloading config in case the
* raiseOnFocusDelay option was disabled or changed.
*/
desktop_cancel_pending_auto_raise();
scaled_buffer_invalidate_sharing();
rcxml_finish();
rcxml_read(rc.config_file);