aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-05 02:20:20 +0100
committerMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-05 02:25:56 +0100
commitc20c63b677c03b17441f0d135b5325e23d65f38d (patch)
treee16dde2339d7cb1079a83842c53324ac91fed600 /sway/commands.c
parent7727c9efbc105269befe06a5bb12d2019c52515e (diff)
Send IPC modifier event on bar_modifier up/down
Detects when a bar modifier key is pressed/released and sends a modifier IPC event to any listeners (usually swaybars). This way a swaybar can listen on the modifier event and hide/show the bar accordingly (not implemented yet) The modifier event looks like this: { "change": "pressed", // or released "modifier": "Mod4" }
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 38019be5..f748a969 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1897,7 +1897,7 @@ static struct cmd_results *bar_cmd_modifier(int argc, char **argv) {
bool is_mod = false;
for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) {
if (strcasecmp(modifiers[j].name, split->items[i]) == 0) {
- mod |= modifiers[j].mod;
+ mod = modifiers[j].mod;
is_mod = true;
break;
}