From 8111286463b8e03d8eb7747dce134b0a246b5aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 13 Aug 2018 01:25:13 +0200 Subject: [PATCH] messageTray: Disable unredirection while showing banners We don't usually show notification banners while the monitor is in fullscreen, but when we do - the notification is urgent - we should actually show the banner, even if the top-most window is unredirected. To achieve that, disable unredirection while the banner is showing. https://gitlab.gnome.org/GNOME/gnome-shell/issues/430 (cherry picked from commit 4dc2039859fc05d8cab43478e2c66bc51b530802) --- js/ui/messageTray.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 9ce5b4460..a0de45ade 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1307,8 +1307,10 @@ var MessageTray = new Lang.Class({ } this._banner = this._notification.createBanner(); - this._bannerClickedId = this._banner.connect('done-displaying', - this._escapeTray.bind(this)); + this._bannerClickedId = this._banner.connect('done-displaying', () => { + Meta.enable_unredirect_for_display(global.display); + this._escapeTray(); + }); this._bannerUnfocusedId = this._banner.connect('unfocused', () => { this._updateState(); }); @@ -1320,6 +1322,7 @@ var MessageTray = new Lang.Class({ this._bannerBin.y = -this._banner.actor.height; this.actor.show(); + Meta.disable_unredirect_for_display(global.display); this._updateShowingNotification(); let [x, y, mods] = global.get_pointer();