[gnome-shell/wip/carlosg/grab-helper-captured-events: 5/7] endSessionDialog: Connect to events in the dialog itself




commit b3f5fdcb6bb68c8b672ce611850c5b50ff44cffe
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Feb 1 14:12:17 2022 +0100

    endSessionDialog: Connect to events in the dialog itself
    
    Connecting to stage events won't work from a modal dialog, since the
    grab will take events from the portions of the actor hierarchy above
    the grabbing actor.
    
    Connect to events from the dialog itself, so that the end session
    dialog can again show the "boot options" easter egg.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>

 js/ui/endSessionDialog.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 1fdbd11b93..9f8bcb1ba1 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -467,7 +467,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
                     label: C_('button', 'Boot Options'),
                 });
                 this._rebootButtonAlt.visible = false;
-                this._capturedEventId = global.stage.connect('captured-event',
+                this._capturedEventId = this.connect('captured-event',
                     this._onCapturedEvent.bind(this));
             }
         }


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