From 70e0b2a4ed81db5fe4a91eddd195bc7d03af594a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Aug 2024 16:00:15 +0200 Subject: [PATCH] (!1654) Xnest: replace XSetClipMask() by xcb_change_gc() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GC.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 69f25668b..63757b5fa 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -206,7 +206,13 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) switch (type) { case CT_NONE: - XSetClipMask(xnestDisplay, xnestGC(pGC), XCB_PIXMAP_NONE); + { + uint32_t pixmap = XCB_PIXMAP_NONE; + xcb_change_gc(xnestUpstreamInfo.conn, + xnest_upstream_gc(pGC), + XCB_GC_CLIP_MASK, + &pixmap); + } pValue = NULL; break; @@ -240,8 +246,13 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) break; case CT_PIXMAP: - XSetClipMask(xnestDisplay, xnestGC(pGC), - xnestPixmap((PixmapPtr) pValue)); + { + uint32_t val = xnestPixmap((PixmapPtr) pValue); + xcb_change_gc(xnestUpstreamInfo.conn, + xnest_upstream_gc(pGC), + XCB_GC_CLIP_MASK, + &val); + } /* * Need to change into region, so subsequent uses are with * current pixmap contents. @@ -319,7 +330,11 @@ xnestDestroyClip(GCPtr pGC) { if (pGC->clientClip) { RegionDestroy(pGC->clientClip); - XSetClipMask(xnestDisplay, xnestGC(pGC), XCB_PIXMAP_NONE); + uint32_t val = XCB_PIXMAP_NONE; + xcb_change_gc(xnestUpstreamInfo.conn, + xnest_upstream_gc(pGC), + XCB_GC_CLIP_MASK, + &val); pGC->clientClip = NULL; } }