[gnome-shell/gnome-42] lockScreen: Extend modal grab to entire uiGroup



commit 3bc04ab1541e17d90b81006cbb63d8bac6fabb6f
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 13 14:30:00 2022 +0200

    lockScreen: Extend modal grab to entire uiGroup
    
    Main.pushModal() used to ensure a compositor grab, but didn't
    take an input grab. That changed when porting to ClutterGrab,
    so by limiting the grab to the shield/dialog, it is no longer
    possible to access top bar menus when the screen is locked.
    
    To fix that, take the grab on the whole uiGroup so that the top
    bar is included.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5470
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2298>
    (cherry picked from commit 3e7ce18dcf596871a89f4befa9123e2a1030ae93)

 js/ui/screenShield.js | 2 +-
 js/ui/unlockDialog.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index a78172047e..be6a72190e 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -196,7 +196,7 @@ var ScreenShield = class {
         if (this._isModal)
             return true;
 
-        let grab = Main.pushModal(this.actor, { actionMode: Shell.ActionMode.LOCK_SCREEN });
+        let grab = Main.pushModal(Main.uiGroup, { actionMode: Shell.ActionMode.LOCK_SCREEN });
 
         // We expect at least a keyboard grab here
         this._isModal = (grab.get_seat_state() & Clutter.GrabState.KEYBOARD) !== 0;
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index dd13e312bd..25fc5685a9 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -873,7 +873,7 @@ var UnlockDialog = GObject.registerClass({
             timestamp,
             actionMode: Shell.ActionMode.UNLOCK_SCREEN,
         };
-        let grab = Main.pushModal(this, modalParams);
+        let grab = Main.pushModal(Main.uiGroup, modalParams);
         if (grab.get_seat_state() !== Clutter.GrabState.ALL) {
             Main.popModal(grab);
             return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]