mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
swaybar: hide mode visibility improvements
This allows swaybar to become visible when the mode changes (to any mode other than the default). swaybar will be hidden again when the modifier is pressed and released or when switching back to the default mode. This also applies the same logic to visible by urgency to hide swaybar when the modifier is pressed and released. These changes are to match i3's behavior.
This commit is contained in:
parent
b6e55064fe
commit
583ceff6f6
3 changed files with 12 additions and 1 deletions
|
|
@ -148,7 +148,8 @@ bool determine_bar_visibility(struct swaybar *bar, bool moving_layer) {
|
|||
struct swaybar_config *config = bar->config;
|
||||
bool visible = !(strcmp(config->mode, "invisible") == 0 ||
|
||||
(strcmp(config->mode, config->hidden_state) == 0 // both "hide"
|
||||
&& !bar->visible_by_modifier && !bar->visible_by_urgency));
|
||||
&& !bar->visible_by_modifier && !bar->visible_by_urgency
|
||||
&& !bar->visible_by_mode));
|
||||
|
||||
// Create/destroy layer surfaces as needed
|
||||
struct swaybar_output *output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue