Fix landscape appearance bug in multi-monitor setup

In a multi-monitor setup, the keyboard didn't appear correctly since
commit 9cc8931b46 . This affected only
landscape mode and only on multi-monitor setups where wvkbd is launched
on anything but the first output (and perhaps even only in
multi-monitor setups where one is portrait mode and one landscape like
mine, I'm not sure).

In the mentioned commit Willow commented:

> On situation where multiple screens are present, it will eventually need
> a second loop (roundtrip)

It seems that second loop never really made it all the way to drawing.
Adding an explicit drwsurf_attach() unconditionally in
layer_surface_configure fixes this.

I'm not sure if this is the best way but this fixes this bug, and as far
as I know doesn't cause extra redraws/resizes in the normal
single-monitor scenario.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Maarten van Gompel
2025-08-09 17:28:57 +02:00
parent 90ac0454cd
commit 5689b6bd33
2 changed files with 3 additions and 1 deletions

3
main.c
View File

@@ -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);
}