From f7105041ac21a6e4a420db291a5eecc6061d9cd3 Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Sat, 14 Jan 2023 21:37:21 +0700 Subject: [PATCH] windowAttentionHandler: Destroy source before activating window This fixes an issue where the window attention notification may sometime fail to actually focus the window. --- js/ui/windowAttentionHandler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js index 09ffeb6e57..001dd47ec2 100644 --- a/js/ui/windowAttentionHandler.js +++ b/js/ui/windowAttentionHandler.js @@ -95,6 +95,11 @@ class WindowAttentionSource extends MessageTray.Source { } open() { + // Make sure everything is settled before activating the window to + // avoid interference from the window object's signal handlers while + // the notification is still active. + this.destroy(); + Main.activateWindow(this._window); } }); -- GitLab