From 4156c3ed2bb74d784d7bd0e8f150aeeb03556e8c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 1 Aug 2024 12:42:48 +0200 Subject: [PATCH] Xnest: replace XFillPolygon() by xcb_fill_poly() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GCOps.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 1a4d39009..32e4ffeb1 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -276,8 +276,15 @@ void xnestFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode, int nPoints, DDXPointPtr pPoints) { - XFillPolygon(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), - (XPoint *) pPoints, nPoints, shape, mode); + /* xPoint and xcb_segment_t are defined in the same way, both matching + the protocol layout, so we can directly typecast them */ + xcb_fill_poly(xnestUpstreamInfo.conn, + xnestDrawable(pDrawable), + xnestUpstreamGC(pGC), + shape, + mode, + nPoints, + (xcb_point_t*)pPoints); } void