summaryrefslogtreecommitdiff
path: root/sway/commands/bind.c
diff options
context:
space:
mode:
authorWilliam McKinnon <[email protected]>2022-04-27 17:33:23 -0400
committerWilliam McKinnon <[email protected]>2022-04-27 17:33:23 -0400
commit7460d9f565092836f81b917a040caff57142d91a (patch)
treeb76e7facef2aaa5925a62ad6b9995c16663313f0 /sway/commands/bind.c
parentc37aba2736e31264bdcd52147a96fa85e17c8c5f (diff)
merge sway master
Diffstat (limited to 'sway/commands/bind.c')
-rw-r--r--sway/commands/bind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 25be415e..26c99e63 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -47,7 +47,7 @@ static bool binding_switch_compare(struct sway_switch_binding *binding_a,
if (binding_a->type != binding_b->type) {
return false;
}
- if (binding_a->state != binding_b->state) {
+ if (binding_a->trigger != binding_b->trigger) {
return false;
}
if ((binding_a->flags & BINDING_LOCKED) !=
@@ -551,11 +551,11 @@ struct cmd_results *cmd_bind_or_unbind_switch(int argc, char **argv,
"unknown switch %s)", bindtype, split->items[0]);
}
if (strcmp(split->items[1], "on") == 0) {
- binding->state = WLR_SWITCH_STATE_ON;
+ binding->trigger = SWAY_SWITCH_TRIGGER_ON;
} else if (strcmp(split->items[1], "off") == 0) {
- binding->state = WLR_SWITCH_STATE_OFF;
+ binding->trigger = SWAY_SWITCH_TRIGGER_OFF;
} else if (strcmp(split->items[1], "toggle") == 0) {
- binding->state = WLR_SWITCH_STATE_TOGGLE;
+ binding->trigger = SWAY_SWITCH_TRIGGER_TOGGLE;
} else {
free_switch_binding(binding);
return cmd_results_new(CMD_FAILURE,