From 63929e61c98e7e6057553b18f5bb6e4d084543e6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 1 Aug 2024 11:30:09 +0200 Subject: [PATCH] Xnest: replace XDrawRectangles() by xcb_poly_rectangle() 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 d03838949..df338c04a 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -244,8 +244,13 @@ void xnestPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRectangles, xRectangle *pRectangles) { - XDrawRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), - (XRectangle *) pRectangles, nRectangles); + /* xRectangle and xcb_rectangle_t are defined in the same way, both matching + the protocol layout, so we can directly typecast them */ + xcb_poly_rectangle(xnestUpstreamInfo.conn, + xnestDrawable(pDrawable), + xnest_upstream_gc(pGC), + nRectangles, + (xcb_rectangle_t*)pRectangles); } void