From 843e2ad2c140288733110691f7dc8252fbe4dc16 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Tue, 5 Jan 2016 23:18:59 +0100 Subject: Only send modifier event once for active modifiers This makes sure that a modifier event is only sent for active bar modifiers, and that it is only sent once for each of those modifiers. An active bar modifier is a modifier defined for a bar with `mode hide` and `hidden_state hide`. --- include/config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/config.h b/include/config.h index a915fbed..5e1c39f3 100644 --- a/include/config.h +++ b/include/config.h @@ -135,6 +135,7 @@ struct sway_config { list_t *workspace_outputs; list_t *output_configs; list_t *criteria; + list_t *active_bar_modifiers; struct sway_mode *current_mode; struct bar_config *current_bar; uint32_t floating_mod; @@ -176,6 +177,11 @@ void merge_output_config(struct output_config *dst, struct output_config *src); void apply_output_config(struct output_config *oc, swayc_t *output); void free_output_config(struct output_config *oc); +/** + * Updates the list of active bar modifiers + */ +void update_active_bar_modifiers(void); + int workspace_output_cmp_workspace(const void *a, const void *b); int sway_binding_cmp(const void *a, const void *b); -- cgit v1.2.3-70-g09d2