mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
Fix release keybindings being triggered after mouse bindings
This commit is contained in:
parent
bb1d0b4352
commit
5b1ab48abf
2 changed files with 5 additions and 4 deletions
|
|
@ -177,6 +177,8 @@ const char *action_names[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct keybind *cur_keybind;
|
||||||
|
|
||||||
void
|
void
|
||||||
action_arg_add_str(struct action *action, const char *key, const char *value)
|
action_arg_add_str(struct action *action, const char *key, const char *value)
|
||||||
{
|
{
|
||||||
|
|
@ -707,6 +709,8 @@ actions_run(struct view *activator, struct server *server,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_keybind = NULL;
|
||||||
|
|
||||||
struct view *view;
|
struct view *view;
|
||||||
struct action *action;
|
struct action *action;
|
||||||
wl_list_for_each(action, actions, link) {
|
wl_list_for_each(action, actions, link) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ struct keyinfo {
|
||||||
|
|
||||||
static bool should_cancel_cycling_on_next_key_release;
|
static bool should_cancel_cycling_on_next_key_release;
|
||||||
|
|
||||||
static struct keybind *cur_keybind;
|
struct keybind *cur_keybind;
|
||||||
|
|
||||||
/* Called on --reconfigure to prevent segfault when handling release keybinds */
|
/* Called on --reconfigure to prevent segfault when handling release keybinds */
|
||||||
void
|
void
|
||||||
|
|
@ -438,7 +438,6 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
actions_run(NULL, server, &cur_keybind->actions, 0);
|
actions_run(NULL, server, &cur_keybind->actions, 0);
|
||||||
cur_keybind = NULL;
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return handle_key_release(server, event->keycode);
|
return handle_key_release(server, event->keycode);
|
||||||
|
|
@ -488,8 +487,6 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
key_state_store_pressed_key_as_bound(event->keycode);
|
key_state_store_pressed_key_as_bound(event->keycode);
|
||||||
if (!cur_keybind->on_release) {
|
if (!cur_keybind->on_release) {
|
||||||
actions_run(NULL, server, &cur_keybind->actions, 0);
|
actions_run(NULL, server, &cur_keybind->actions, 0);
|
||||||
/* This cancels any pending on-release keybinds */
|
|
||||||
cur_keybind = NULL;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue