From c20c63b677c03b17441f0d135b5325e23d65f38d Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Tue, 5 Jan 2016 02:20:20 +0100 Subject: 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" } --- sway/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands.c') 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; } -- cgit v1.2.3