From f82078bd92e7e0343fc337a16c20e9ffb30b3dcb Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 24 Jun 2022 11:21:43 -0400 Subject: layer surface configure: Don't resize unless it needs to be resized --- main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 8dd7810..2e3a2ba 100644 --- a/main.c +++ b/main.c @@ -302,9 +302,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) { - keyboard.w = w; - keyboard.h = h; - kbd_resize(&keyboard); + if (w != keyboard.w || h != keyboard.h) { + keyboard.w = w; + keyboard.h = h; + kbd_resize(&keyboard); + } zwlr_layer_surface_v1_ack_configure(surface, serial); } -- cgit 1.4.1