[gnome-shell/wip/carlosg/grab-helper-captured-events: 3/4] modalDialog: Ensure to let focus manager handle key events
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/grab-helper-captured-events: 3/4] modalDialog: Ensure to let focus manager handle key events
- Date: Tue, 1 Feb 2022 13:50:02 +0000 (UTC)
commit a4ce4f381d44d66638df518bcd0e65b9a93b4e7e
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 1 14:31:37 2022 +0100
modalDialog: Ensure to let focus manager handle key events
Since the grab no longer lets events bubble up to the stage unstopped,
we should be forwarding the key events that bubbled up to the dialog
to maybe cycle focus.
Fixes focus cycling on keyboard navigation inside dialogs.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>
js/ui/modalDialog.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index 259a9c6bbc..52de75decd 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -101,6 +101,13 @@ var ModalDialog = GObject.registerClass({
this.notify('state');
}
+ vfunc_key_press_event(keyEvent) {
+ if (global.focus_manager.navigate_from_event(Clutter.get_current_event()))
+ return Clutter.EVENT_STOP;
+
+ return Clutter.EVENT_PROPAGATE;
+ }
+
clearButtons() {
this.dialogLayout.clearButtons();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]