From 84926b8c555eeae1e67af1b189970471ef8d1c2b 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 662d1e609..4454d4ee7 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -234,8 +234,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), + xnestUpstreamGC(pGC), + nSegments, + (xcb_segment_t*)pSegments); } void