[gnome-shell/wip/carlosg/grab-helper-captured-events: 12/13] modalDialog: Ensure to let focus manager handle key events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/grab-helper-captured-events: 12/13] modalDialog: Ensure to let focus manager handle key events
- Date: Tue, 1 Feb 2022 13:45:46 +0000 (UTC)
commit c01687c522a5752fec730b3001dd2a1f7da3cda1
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.
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]