diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-06-24 11:21:43 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-06-24 11:21:43 -0400 |
| commit | f82078bd92e7e0343fc337a16c20e9ffb30b3dcb (patch) | |
| tree | cdc43b8d4aac6a3c6488b5d281fd8e1f173e7026 | |
| parent | 95a02345f5b5366b1417b377757fa7a0ba411156 (diff) | |
| download | suggpicker-f82078bd92e7e0343fc337a16c20e9ffb30b3dcb.tar.gz | |
layer surface configure: Don't resize unless it needs to be resized
| -rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |
