From df6b75fa4595823b186a3b96f7ab51fd5a9c087c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 1 Aug 2024 11:20:06 +0200 Subject: [PATCH] Xnest: replace XDrawSegments() by xcb_poly_segment() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GCOps.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 5255d1e95..d03838949 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -231,8 +231,13 @@ void xnestPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments, xSegment * pSegments) { - XDrawSegments(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), - (XSegment *) pSegments, nSegments); + /* xSegment and xcb_segment_t are defined in the same way, both matching + the protocol layout, so we can directly typecast them */ + xcb_poly_segment(xnestUpstreamInfo.conn, + xnestDrawable(pDrawable), + xnest_upstream_gc(pGC), + nSegments, + (xcb_segment_t*)pSegments); } void