diff options
-rw-r--r-- | swaybar/bar.c | 1 | ||||
-rw-r--r-- | swaybar/render.c | 2 |
2 files changed, 1 insertions, 2 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 | } |
diff --git a/swaybar/render.c b/swaybar/render.c index 670630cf..097eb462 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -519,7 +519,7 @@ void render_frame(struct swaybar_output *output) { | |||
519 | if (config_height >= 0 && height < (uint32_t)config_height) { | 519 | if (config_height >= 0 && height < (uint32_t)config_height) { |
520 | height = config_height; | 520 | height = config_height; |
521 | } | 521 | } |
522 | if (height != output->height) { | 522 | if (height != output->height || output->width == 0) { |
523 | // Reconfigure surface | 523 | // Reconfigure surface |
524 | zwlr_layer_surface_v1_set_size(output->layer_surface, 0, height); | 524 | zwlr_layer_surface_v1_set_size(output->layer_surface, 0, height); |
525 | if (strcmp(output->bar->config->mode, "dock") == 0) { | 525 | if (strcmp(output->bar->config->mode, "dock") == 0) { |