From 60b98f5044525edc5defdb0638484924dcd0140d Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 24 Mar 2026 17:01:41 +0100 Subject: [PATCH] xwayland: Commit surface on configure event Commit f5d8e112 introduced a regression, removing the call to wl_surface_commit() except for the initial configure event. That causes a massive GPU memory leak. Fix the issue by restoring the wl_surface_commit() for all configure events, as before commit f5d8e112. Fixes: f5d8e112 ("xwayland: Avoid premature surface commit running rootfull") Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1877 --- hw/xwayland/xwayland-window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index b0e0cddd9..9755f3b4d 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -1020,8 +1020,9 @@ handle_libdecor_configure(struct libdecor_frame *frame, if (xwl_window->awaiting_initial_configure_event) { xwl_window->awaiting_initial_configure_event = FALSE; xwl_window_attach_buffer(xwl_window); - wl_surface_commit(xwl_window->surface); } + + wl_surface_commit(xwl_window->surface); } static void @@ -1071,8 +1072,9 @@ xdg_surface_handle_configure(void *data, if (xwl_window->awaiting_initial_configure_event) { xwl_window->awaiting_initial_configure_event = FALSE; xwl_window_attach_buffer(xwl_window); - wl_surface_commit(xwl_window->surface); } + + wl_surface_commit(xwl_window->surface); } static const struct xdg_surface_listener xdg_surface_listener = {