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 <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1877
This commit is contained in:
Olivier Fourdan 2026-03-24 17:01:41 +01:00
parent d2e83a266c
commit 60b98f5044

View file

@ -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 = {