diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-05 23:18:59 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-05 23:18:59 +0100 |
commit | 843e2ad2c140288733110691f7dc8252fbe4dc16 (patch) | |
tree | 3244491ed6cc45666e0599f8cbb3099864f627eb /include | |
parent | Add modifier key to bar_config json (diff) | |
download | sway-843e2ad2c140288733110691f7dc8252fbe4dc16.tar.gz sway-843e2ad2c140288733110691f7dc8252fbe4dc16.tar.zst sway-843e2ad2c140288733110691f7dc8252fbe4dc16.zip |
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`.
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 { | |||
135 | list_t *workspace_outputs; | 135 | list_t *workspace_outputs; |
136 | list_t *output_configs; | 136 | list_t *output_configs; |
137 | list_t *criteria; | 137 | list_t *criteria; |
138 | list_t *active_bar_modifiers; | ||
138 | struct sway_mode *current_mode; | 139 | struct sway_mode *current_mode; |
139 | struct bar_config *current_bar; | 140 | struct bar_config *current_bar; |
140 | uint32_t floating_mod; | 141 | uint32_t floating_mod; |
@@ -176,6 +177,11 @@ void merge_output_config(struct output_config *dst, struct output_config *src); | |||
176 | void apply_output_config(struct output_config *oc, swayc_t *output); | 177 | void apply_output_config(struct output_config *oc, swayc_t *output); |
177 | void free_output_config(struct output_config *oc); | 178 | void free_output_config(struct output_config *oc); |
178 | 179 | ||
180 | /** | ||
181 | * Updates the list of active bar modifiers | ||
182 | */ | ||
183 | void update_active_bar_modifiers(void); | ||
184 | |||
179 | int workspace_output_cmp_workspace(const void *a, const void *b); | 185 | int workspace_output_cmp_workspace(const void *a, const void *b); |
180 | 186 | ||
181 | int sway_binding_cmp(const void *a, const void *b); | 187 | int sway_binding_cmp(const void *a, const void *b); |