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