layout: Implement spacing better

to no longer need overscan

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Zach DeCook
2022-07-08 23:38:12 -04:00
committed by Maarten van Gompel
parent 1843e60a74
commit 0cd0d5e1a1
3 changed files with 9 additions and 5 deletions

4
main.c
View File

@ -334,8 +334,8 @@ 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 ( keyboard.w != w + KBD_PIXEL_OVERSCAN_WIDTH || keyboard.h != h ) {
keyboard.w = w + KBD_PIXEL_OVERSCAN_WIDTH;
if (keyboard.w != w || keyboard.h != h) {
keyboard.w = w;
keyboard.h = h;
kbd_resize(&keyboard, layouts, NumLayouts);
}