Fix window attention notification
We have to destroy the source now before activating the window,
otherwise the window activation will trigger the focus
signal
on the window, causing the source to be destroyed right after
the window is activated. This leads to FocusGrabber in MessageTray
to try to revert the key focus actor, causing sync_stage_window_focus
in the native code portion of the shell to activate the workspace
default window (which is usually the previously focused window in
this case).
Fixes #6236 (closed)
How to reproduce (GNOME 43)
- Start an empty desktop session
- Open Terminal and maximize its window
- Run
gedit &
(make sure chromium is not running) - Go back to the terminal window
- Run
gedit &
again - Click on the "is ready" notification that just displayed
Expected behavior: The window focuses
Actual behavior: It doesn't
Edited by msizanoen1