From b7e1ed178167403f2da3c4dd49ab6c043e5fc953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sat, 30 Mar 2019 16:55:10 +0100 Subject: [PATCH] fixup! navigator: Rewrite the keybind handler --- navigator.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/navigator.js b/navigator.js index 2a20fdb..2150349 100644 --- a/navigator.js +++ b/navigator.js @@ -101,9 +101,6 @@ var ActionDispatcher = class { let keysym = event.get_key_symbol(); let action = global.display.get_keybinding_action(event.get_key_code(), event.get_state()); - if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE) - return Clutter.EVENT_STOP; - // Popping the modal on keypress doesn't work properly, as the release // event will leak to the active window. To work around this we initate // visual destruction on key-press and signal to the release handler @@ -112,8 +109,11 @@ var ActionDispatcher = class { if (keysym == Clutter.Escape || keysym == Clutter.Tab) { this.navigator.destroy(); this._destroy = true; + return Clutter.EVENT_STOP; } + this._doAction(action); + return Clutter.EVENT_STOP; } @@ -134,15 +134,6 @@ var ActionDispatcher = class { return Clutter.EVENT_STOP; } - - _keyPressHandler(keysym, action) { - if (keysym !== Clutter.KEY_Escape && this._doAction(action)) { - return Clutter.EVENT_STOP; - } else { - return Clutter.EVENT_PROPAGATE; - } - } - _doAction(mutterActionId) { let action = Keybindings.byId(mutterActionId);