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>
This commit is contained in:
Carlos Garnacho 2022-02-01 14:12:17 +01:00 committed by Marge Bot
parent e374a4957f
commit b3f5fdcb6b

View File

@ -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));
}
}