mirror of
https://github.com/swaywm/sway.git
synced 2026-04-01 07:16:02 -04:00
parent
9f98c38d3e
commit
04676936e7
3 changed files with 26 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue