From c8e912cff4b548a134f72661ef6bb62290acc4a7 Mon Sep 17 00:00:00 2001 From: Willow Barraco Date: Sun, 17 Sep 2023 20:18:19 +0200 Subject: Regression fix: keyboard didn't re-show on SIGUSR2 anymore When triggering show() on kill USR2, everything works as expected, but the keyboard attributes are the same as before. So in layer_surface_configure, we don't match the condition. Checking hidden, and resetting it from inside this scope is enough to solve the problem. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 124dddb..2193713 100644 --- a/main.c +++ b/main.c @@ -306,10 +306,11 @@ handle_global_remove(void *data, struct wl_registry *registry, uint32_t name) {} void layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, uint32_t serial, uint32_t w, uint32_t h) { - if (w != keyboard.w || h != keyboard.h) { + if (w != keyboard.w || h != keyboard.h || hidden) { keyboard.w = w; keyboard.h = h; kbd_resize(&keyboard); + hidden = false; } zwlr_layer_surface_v1_ack_configure(surface, serial); @@ -378,7 +379,6 @@ show(int sigint) { wl_display_roundtrip(display); drwsurf_flip(&draw_surf); - hidden = false; // Dispatch so that bar appears (and can take events). wl_display_dispatch(display); } -- cgit 1.4.1