diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 5255d1e95..d03838949 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -231,8 +231,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), + xnest_upstream_gc(pGC), + nSegments, + (xcb_segment_t*)pSegments); } void