aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 6c6d0e60..5e523468 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -387,6 +387,22 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
}
}
}
+
+ // handle bar modifiers pressed/released
+ struct bar_config *bar;
+ for (i = 0; i < config->bars->length; ++i) {
+ bar = config->bars->items[i];
+ switch (modifier_state_changed(modifiers->mods, bar->modifier)) {
+ case MOD_STATE_PRESSED:
+ sway_log(L_INFO, "pressed!!!");
+ break;
+ case MOD_STATE_RELEASED:
+ sway_log(L_INFO, "released!!!");
+ break;
+ }
+ }
+ // update modifiers state
+ modifiers_state_update(modifiers->mods);
return EVENT_PASSTHROUGH;
}