From 0132baa422ba51dbe645e9e13a96396aa00e57d4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 30 Sep 2024 17:59:14 +0200 Subject: [PATCH] xwayland: use dixDestroyPixmap() instead of direct driver call Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwayland/xwayland-output.c | 2 +- hw/xwayland/xwayland-window-buffers.c | 6 ++---- hw/xwayland/xwayland-window.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index dd0d71690..2b901431b 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -180,7 +180,7 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height) if (old_pixmap) { TraverseTree(pRoot, xwl_set_pixmap_visit_window, old_pixmap); - pScreen->DestroyPixmap(old_pixmap); + dixDestroyPixmap(old_pixmap, 0); } pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL); diff --git a/hw/xwayland/xwayland-window-buffers.c b/hw/xwayland/xwayland-window-buffers.c index a470ef313..09265078c 100644 --- a/hw/xwayland/xwayland-window-buffers.c +++ b/hw/xwayland/xwayland-window-buffers.c @@ -97,10 +97,8 @@ xwl_window_buffer_new(struct xwl_window *xwl_window) static void xwl_window_buffer_destroy_pixmap(struct xwl_window_buffer *xwl_window_buffer) { - ScreenPtr pScreen = xwl_window_buffer->pixmap->drawable.pScreen; - xwl_pixmap_del_buffer_release_cb(xwl_window_buffer->pixmap); - (*pScreen->DestroyPixmap) (xwl_window_buffer->pixmap); + dixDestroyPixmap(xwl_window_buffer->pixmap, 0); xwl_window_buffer->pixmap = NullPixmap; } @@ -363,7 +361,7 @@ xwl_window_realloc_pixmap(struct xwl_window *xwl_window) window_pixmap->drawable.width, window_pixmap->drawable.height); xwl_window_set_pixmap(xwl_window->surface_window, new_window_pixmap); - screen->DestroyPixmap(window_pixmap); + dixDestroyPixmap(window_pixmap, 0); } static Bool diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index b717fcf3c..a77f4fb88 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -317,7 +317,7 @@ damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data) window_pixmap = xwl_screen->screen->GetWindowPixmap(xwl_window->surface_window); if (xwl_is_client_pixmap(window_pixmap)) - xwl_screen->screen->DestroyPixmap(xwl_window_swap_pixmap(xwl_window, FALSE)); + dixDestroyPixmap(xwl_window_swap_pixmap(xwl_window, FALSE), 0); } static void