xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 11 08:23:17 UTC 2023
hw/xwayland/xwayland-window.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 295fb71653687bd82c53b84fafac79482f4fb727
Author: Kenny Levinsen <kl at kl.wtf>
Date: Thu Aug 10 13:31:17 2023 +0200
xwayland: Commit after acknowledging configure
When handling libdecor configure, we first update our xwl output and
screen if dimensions differ from the current xwl_screen, and then commit
a new libdecor frame which acknowledges the xdg_surface.configure event.
If the initial configure events contains non-zero dimensions, we will
update the xwl output before acknowledging the initial configure. As we
attach a buffer and commit the surface when updating the output, this
leads to a protocol error.
Instead, move the surface commit till the end of the configure handler
so it always happens after the ack.
Signed-off-by: Kenny Levinsen <kl at kl.wtf>
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index f1d6580e6..3ecb99da2 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -647,7 +647,6 @@ xwl_window_libdecor_resize(struct xwl_window *xwl_window, int width, int height)
xwl_output_set_mode_fixed(xwl_output, mode);
xwl_window_attach_buffer(xwl_window);
- wl_surface_commit(xwl_window->surface);
}
static void
@@ -672,6 +671,7 @@ handle_libdecor_configure(struct libdecor_frame *frame,
xwl_window_update_libdecor_size(xwl_window, configuration,
xwl_screen->width, xwl_screen->height);
+ wl_surface_commit(xwl_window->surface);
}
static void
More information about the xorg-commit
mailing list