diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 5e523468..4cbec0ab 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "resize.h" | 20 | #include "resize.h" |
21 | #include "extensions.h" | 21 | #include "extensions.h" |
22 | #include "criteria.h" | 22 | #include "criteria.h" |
23 | #include "ipc-server.h" | ||
23 | 24 | ||
24 | // Event should be sent to client | 25 | // Event should be sent to client |
25 | #define EVENT_PASSTHROUGH false | 26 | #define EVENT_PASSTHROUGH false |
@@ -392,13 +393,15 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
392 | struct bar_config *bar; | 393 | struct bar_config *bar; |
393 | for (i = 0; i < config->bars->length; ++i) { | 394 | for (i = 0; i < config->bars->length; ++i) { |
394 | bar = config->bars->items[i]; | 395 | bar = config->bars->items[i]; |
395 | switch (modifier_state_changed(modifiers->mods, bar->modifier)) { | 396 | if (strcmp(bar->mode, "hide") == 0 && strcmp(bar->hidden_state, "hide") == 0) { |
396 | case MOD_STATE_PRESSED: | 397 | switch (modifier_state_changed(modifiers->mods, bar->modifier)) { |
397 | sway_log(L_INFO, "pressed!!!"); | 398 | case MOD_STATE_PRESSED: |
398 | break; | 399 | ipc_event_modifier(bar->modifier, "pressed"); |
399 | case MOD_STATE_RELEASED: | 400 | break; |
400 | sway_log(L_INFO, "released!!!"); | 401 | case MOD_STATE_RELEASED: |
401 | break; | 402 | ipc_event_modifier(bar->modifier, "released"); |
403 | break; | ||
404 | } | ||
402 | } | 405 | } |
403 | } | 406 | } |
404 | // update modifiers state | 407 | // update modifiers state |