mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
Only send modifier event once for active modifiers
This makes sure that a modifier event is only sent for active bar modifiers, and that it is only sent once for each of those modifiers. An active bar modifier is a modifier defined for a bar with `mode hide` and `hidden_state hide`.
This commit is contained in:
parent
a8402035e9
commit
843e2ad2c1
4 changed files with 54 additions and 12 deletions
|
|
@ -1751,6 +1751,9 @@ static struct cmd_results *bar_cmd_hidden_state(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
// active bar modifiers might have changed.
|
||||
update_active_bar_modifiers();
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -1775,6 +1778,9 @@ static struct cmd_results *bar_set_mode(struct bar_config *bar, const char *mode
|
|||
if (strcmp(old_mode, bar->mode) != 0) {
|
||||
if (!config->reading) {
|
||||
ipc_event_barconfig_update(bar);
|
||||
|
||||
// active bar modifiers might have changed.
|
||||
update_active_bar_modifiers();
|
||||
}
|
||||
sway_log(L_DEBUG, "Setting mode: '%s' for bar: %s", bar->mode, bar->id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue