diff options
author | Simon Ser <contact@emersion.fr> | 2022-03-08 16:24:27 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-08 13:24:11 -0500 |
commit | 04676936e71f6fccccb098f3232d16572b140902 (patch) | |
tree | af19eb7696ba9c01491f307255c7f34d0a9f1aac /sway/commands | |
parent | 9f98c38d3e02b0187de31a434cc4315a22834593 (diff) |
Remove WLR_SWITCH_STATE_TOGGLE usage
Ref [1].
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/4792446ee8f50104bd207d9ccd8558a7e4eb4514
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/bind.c | 8 |
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, |