aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-08 18:35:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-09 16:51:05 +0000
commite5c5cd54788076973f08f6aadf0d2b2f954a0423 (patch)
treee8af28ce95bf2ffee4f8f00ec08b253f45b82d84 /input.c
parentconfig: rename enum config_key_binding_type -> key_binding_type (diff)
config: ‘pipe’ is now optional ‘aux’ data in the key-binding struct
This allows us to add helper functions that e.g. compare bindings’ aux data in a generic way.
Diffstat (limited to 'input.c')
-rw-r--r--input.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/input.c b/input.c
index 986f26bd..25778683 100644
--- a/input.c
+++ b/input.c
@@ -526,7 +526,7 @@ convert_key_binding(const struct seat *seat,
struct key_binding binding = {
.type = KEY_BINDING,
.action = conf_binding->action,
- .pipe_argv = conf_binding->pipe.argv.args,
+ .aux = &conf_binding->aux,
.mods = mods,
.k = {
.sym = sym,
@@ -570,7 +570,7 @@ convert_mouse_binding(struct seat *seat,
struct key_binding binding = {
.type = MOUSE_BINDING,
.action = conf_binding->action,
- .pipe_argv = conf_binding->pipe.argv.args,
+ .aux = &conf_binding->aux,
.mods = conf_modifiers_to_mask(seat, &conf_binding->modifiers),
.m = {
.button = conf_binding->m.button,
@@ -1526,7 +1526,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
if (bind->k.sym == sym &&
bind->mods == (bind_mods & ~bind_consumed) &&
execute_binding(
- seat, term, bind->action, bind->pipe_argv, serial))
+ seat, term, bind->action, bind->aux->pipe.args, serial))
{
goto maybe_repeat;
}
@@ -1537,7 +1537,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
/* Match untranslated symbols */
for (size_t i = 0; i < raw_count; i++) {
if (bind->k.sym == raw_syms[i] && execute_binding(
- seat, term, bind->action, bind->pipe_argv, serial))
+ seat, term, bind->action, bind->aux->pipe.args, serial))
{
goto maybe_repeat;
}
@@ -1546,7 +1546,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
/* Match raw key code */
tll_foreach(bind->k.key_codes, code) {
if (code->item == key && execute_binding(
- seat, term, bind->action, bind->pipe_argv, serial))
+ seat, term, bind->action, bind->aux->pipe.args, serial))
{
goto maybe_repeat;
}
@@ -2435,7 +2435,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
if (match != NULL) {
consumed = execute_binding(
- seat, term, match->action, match->pipe_argv, serial);
+ seat, term, match->action, match->aux->pipe.args, serial);
}
}
@@ -2470,7 +2470,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
if (match != NULL) {
consumed = execute_binding(
- seat, term, match->action, match->pipe.argv.args,
+ seat, term, match->action, match->aux.pipe.args,
serial);
}
}