aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-10-13 11:56:56 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-10-14 13:33:12 +0100
commit4dba7c084acb6ca1c9d220f8eac918c046c199ad (patch)
treeff3a52a57ee7e8a9a3623e53422fe841afe6d124 /swaybar/bar.c
parentswaybar: send signal to status when hiding or showing bar (diff)
downloadsway-4dba7c084acb6ca1c9d220f8eac918c046c199ad.tar.gz
sway-4dba7c084acb6ca1c9d220f8eac918c046c199ad.tar.zst
sway-4dba7c084acb6ca1c9d220f8eac918c046c199ad.zip
swaybar: when hiding bar, save old height to be restored upon reshow
Previously, when the bar was hidden, the height would be set to 0. This meant that if the bar was empty upon reshow, it would not render since the height was still 0, which made it seem there was a problem. Now, the height is not reset, but the width is, to indicate upon reshow that the layer surface needed reconfiguring.
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index f636f0c9..9f72c94c 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -367,7 +367,6 @@ static void destroy_layer_surface(struct swaybar_output *output) {
367 zwlr_layer_surface_v1_destroy(output->layer_surface); 367 zwlr_layer_surface_v1_destroy(output->layer_surface);
368 wl_surface_attach(output->surface, NULL, 0, 0); // detach buffer 368 wl_surface_attach(output->surface, NULL, 0, 0); // detach buffer
369 output->layer_surface = NULL; 369 output->layer_surface = NULL;
370 output->height = 0;
371 output->width = 0; 370 output->width = 0;
372 output->frame_scheduled = false; 371 output->frame_scheduled = false;
373} 372}