From 4dba7c084acb6ca1c9d220f8eac918c046c199ad Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sat, 13 Oct 2018 11:56:56 +0100 Subject: 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. --- swaybar/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swaybar/render.c') 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) { if (config_height >= 0 && height < (uint32_t)config_height) { height = config_height; } - if (height != output->height) { + if (height != output->height || output->width == 0) { // Reconfigure surface zwlr_layer_surface_v1_set_size(output->layer_surface, 0, height); if (strcmp(output->bar->config->mode, "dock") == 0) { -- cgit v1.2.3-54-g00ecf