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 <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-30 17:59:14 +02:00
parent 4d1953728e
commit 0132baa422
3 changed files with 4 additions and 6 deletions

View File

@ -180,7 +180,7 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
if (old_pixmap) { if (old_pixmap) {
TraverseTree(pRoot, xwl_set_pixmap_visit_window, 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); pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);

View File

@ -97,10 +97,8 @@ xwl_window_buffer_new(struct xwl_window *xwl_window)
static void static void
xwl_window_buffer_destroy_pixmap(struct xwl_window_buffer *xwl_window_buffer) 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); 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; 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.width,
window_pixmap->drawable.height); window_pixmap->drawable.height);
xwl_window_set_pixmap(xwl_window->surface_window, new_window_pixmap); xwl_window_set_pixmap(xwl_window->surface_window, new_window_pixmap);
screen->DestroyPixmap(window_pixmap); dixDestroyPixmap(window_pixmap, 0);
} }
static Bool static Bool

View File

@ -317,7 +317,7 @@ damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data)
window_pixmap = xwl_screen->screen->GetWindowPixmap(xwl_window->surface_window); window_pixmap = xwl_screen->screen->GetWindowPixmap(xwl_window->surface_window);
if (xwl_is_client_pixmap(window_pixmap)) 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 static void