From a18d509fa347b71dc928b01d2f336248b58d23a8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 1 Aug 2024 10:33:32 +0200 Subject: [PATCH] Xnest: replace XDrawLines() by xcb_poly_line() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GCOps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 2e7a7438d..662d1e609 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -220,8 +220,14 @@ void xnestPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints, DDXPointPtr pPoints) { - XDrawLines(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), - (XPoint *) pPoints, nPoints, mode); + /* xPoint and xcb_segment_t are defined in the same way, both matching + the protocol layout, so we can directly typecast them */ + xcb_poly_line(xnestUpstreamInfo.conn, + mode, + xnestDrawable(pDrawable), + xnestUpstreamGC(pGC), + nPoints, + (xcb_point_t*)pPoints); } void