Skip to content

windowManager: Handle window dimming animation getting cancelled

Jonas Dreßler requested to merge verdre/gnome-shell:fix-modal-dialog-issue into main
When a window with a modal dialog gets minimized and at the same time
the dialog is closed, the WindowDimmer undim animation starts and gets
cancelled when the minimize animation is done, because that unmaps the
window actor.

In this case we want ensure the dimming effect still goes into a
proper state instead of being stuck mid-animation, so listen to
onStopped instead of onComplete for syncing state of the window dimmer.

While at it, clean things up a little and move the check for the
attach-modal-dialogs pref inside the _syncEnabled() function.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5581

Merge request reports