diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-10-20 22:52:56 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-10-20 22:52:56 +0200 |
| commit | 99089f0cb4982c73f98c59eb9bd7681de6278c5d (patch) | |
| tree | 55fe01811bc8ac0785ce9798335bfd15553fa708 /swaybar/bar.c | |
| parent | 49d158e6aeb2a27868d68af295d3848548144291 (diff) | |
| parent | 5c62a98a9494ac69769a4509ad049e66b9e0e54d (diff) | |
Merge pull request #2901 from ianyfan/swaybar1.0-beta.1
swaybar: render with minimum height, nominally text height
Diffstat (limited to 'swaybar/bar.c')
| -rw-r--r-- | swaybar/bar.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index fa761925..71aff691 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -28,7 +28,6 @@ static void bar_init(struct swaybar *bar) { bar->config = init_config(); - bar->visible = true; wl_list_init(&bar->outputs); } @@ -227,9 +226,6 @@ static void xdg_output_handle_done(void *data, output->surface = wl_compositor_create_surface(bar->compositor); assert(output->surface); - if (bar->visible) { - add_layer_surface(output); - } } } @@ -377,10 +373,15 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) { pointer->cursor_surface = wl_compositor_create_surface(bar->compositor); assert(pointer->cursor_surface); + bar->visible = true; if (bar->config->workspace_buttons) { - if (ipc_get_workspaces(bar)) { - set_bar_dirty(bar); + ipc_get_workspaces(bar); + } + if (determine_bar_visibility(bar, false)) { + wl_list_for_each(output, &bar->outputs, link) { + add_layer_surface(output); } + set_bar_dirty(bar); } return true; } |
