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.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.c b/main.c
index 01452c3..7a849ee 100644
--- a/main.c
+++ b/main.c
@@ -545,10 +545,12 @@ layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface,
uint32_t serial, uint32_t w, uint32_t h)
{
if (keyboard.w != w || keyboard.h != h ||
- keyboard.scale != keyboard.pending_scale) {
+ keyboard.scale != keyboard.pending_scale || hidden) {
+
keyboard.w = w;
keyboard.h = h;
keyboard.scale = keyboard.pending_scale;
+ hidden = false;
if (wfs_mgr && viewporter) {
if (!wfs_draw_surf) {
@@ -700,8 +702,6 @@ show()
zwlr_layer_surface_v1_add_listener(layer_surface, &layer_surface_listener,
NULL);
wl_surface_commit(draw_surf.surf);
-
- hidden = false;
}
void
--
2.42.0