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




commit a772cec51226ed018745f02a05ca2a8fe5485e23
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]