aboutsummaryrefslogtreecommitdiffstats
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 3cc5cf3e..470f3c95 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
@@ -391,6 +392,23 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
391 } 392 }
392 } 393 }
393 } 394 }
395
396 // handle bar modifiers pressed/released
397 uint32_t modifier;
398 for (i = 0; i < config->active_bar_modifiers->length; ++i) {
399 modifier = *(uint32_t *)config->active_bar_modifiers->items[i];
400
401 switch (modifier_state_changed(modifiers->mods, modifier)) {
402 case MOD_STATE_PRESSED:
403 ipc_event_modifier(modifier, "pressed");
404 break;
405 case MOD_STATE_RELEASED:
406 ipc_event_modifier(modifier, "released");
407 break;
408 }
409 }
410 // update modifiers state
411 modifiers_state_update(modifiers->mods);
394 return EVENT_PASSTHROUGH; 412 return EVENT_PASSTHROUGH;
395} 413}
396 414