mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 11:46:57 +00:00
fixup! navigator: Rewrite the keybind handler
This commit is contained in:
+3
-12
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user