diff options
| author | Willow Barraco <contact@willowbarraco.fr> | 2023-09-17 20:18:19 +0200 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2024-01-14 14:34:31 -0500 |
| commit | c8e912cff4b548a134f72661ef6bb62290acc4a7 (patch) | |
| tree | 3595e922d5e4123255df881112e07ef3ec27aba5 /main.c | |
| parent | 180159140fd84b11fdfeecd3f95b21a696f2b9a2 (diff) | |
| download | suggpicker-c8e912cff4b548a134f72661ef6bb62290acc4a7.tar.gz | |
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.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |
