mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Only store key state on press
This commit is contained in:
parent
522897d5af
commit
fe5704d403
1 changed files with 5 additions and 4 deletions
|
|
@ -415,7 +415,6 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
cur_keybind = NULL;
|
cur_keybind = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
key_state_store_pressed_key_as_bound(event->keycode);
|
|
||||||
actions_run(NULL, server, &cur_keybind->actions, 0);
|
actions_run(NULL, server, &cur_keybind->actions, 0);
|
||||||
cur_keybind = NULL;
|
cur_keybind = NULL;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -459,15 +458,17 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
*/
|
*/
|
||||||
cur_keybind =
|
cur_keybind =
|
||||||
match_keybinding(server, &keyinfo, keyboard->is_virtual);
|
match_keybinding(server, &keyinfo, keyboard->is_virtual);
|
||||||
if (cur_keybind && !cur_keybind->mod_only) {
|
if (cur_keybind) {
|
||||||
/*
|
/*
|
||||||
* Update key-state before action_run() because the action
|
* Update key-state before action_run() because the action
|
||||||
* might lead to seat_focus() in which case we pass the
|
* might lead to seat_focus() in which case we pass the
|
||||||
* 'pressed-sent' keys to the new surface.
|
* 'pressed-sent' keys to the new surface.
|
||||||
*/
|
*/
|
||||||
key_state_store_pressed_key_as_bound(event->keycode);
|
key_state_store_pressed_key_as_bound(event->keycode);
|
||||||
|
if (!cur_keybind->mod_only) {
|
||||||
actions_run(NULL, server, &cur_keybind->actions, 0);
|
actions_run(NULL, server, &cur_keybind->actions, 0);
|
||||||
cur_keybind = NULL;
|
cur_keybind = NULL;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue