diff --git a/keyboard.h b/keyboard.h index ebc0438..14d2d12 100644 --- a/keyboard.h +++ b/keyboard.h @@ -111,6 +111,7 @@ struct kbd { size_t last_abc_index; //the layer index of the last alphabetical layout struct layout *layouts; + struct Output *output; //only used to keep track of landscape flipping, never dereferenced enum layout_id *layers; enum layout_id *landscape_layers; diff --git a/main.c b/main.c index 502d2f5..c1c8f01 100644 --- a/main.c +++ b/main.c @@ -611,7 +611,7 @@ layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, } if (keyboard.w != w || keyboard.h != h || keyboard.scale != scale || - hidden) { + keyboard.output != current_output || hidden) { keyboard.w = w; keyboard.h = h; @@ -665,6 +665,7 @@ layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, zwlr_layer_surface_v1_ack_configure(surface, serial); kbd_resize(&keyboard, layouts, NumLayouts); drwsurf_attach(&draw_surf); + keyboard.output = current_output; } else { zwlr_layer_surface_v1_ack_configure(surface, serial); }