mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-03-13 02:42:47 +01:00
Keyboard: Avoid unnecessary resizes
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
28c24749ba
commit
22ff01fb8b
8
main.c
8
main.c
@ -328,9 +328,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 + KBD_PIXEL_OVERSCAN_WIDTH;
|
||||
keyboard.h = h;
|
||||
kbd_resize(&keyboard, layouts, NumLayouts);
|
||||
if ( keyboard.w != w + KBD_PIXEL_OVERSCAN_WIDTH || keyboard.h != h ) {
|
||||
keyboard.w = w + KBD_PIXEL_OVERSCAN_WIDTH;
|
||||
keyboard.h = h;
|
||||
kbd_resize(&keyboard, layouts, NumLayouts);
|
||||
}
|
||||
|
||||
zwlr_layer_surface_v1_ack_configure(surface, serial);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user