From fbd2bb9dd047a206b9c8cfaca62079c8d866c617 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 1 Aug 2019 12:38:35 +0200 Subject: [PATCH] mi: Use GC clipregion instead of drawable in miDoCopy/miCopyArea As discussed in issue #829 the "mi: Shortcut miDoCopy/miCopyArea based on clipList" change leads to pointer-trails (area under pointer not restored when it moves) when using a software cursor. Checking pGC->pCompositeClip instead of pDstDrawable->clipList fixes this problem. Fixes: #829 Signed-off-by: Hans de Goede --- mi/mibitblt.c | 2 +- mi/micopy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 84f8da65a..dbfc73a4f 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -98,7 +98,7 @@ miCopyArea(DrawablePtr pSrcDrawable, /* If the destination is clipped away, this is easy */ if (pDstDrawable->type == DRAWABLE_WINDOW && - RegionNil(&((WindowPtr)pDstDrawable)->clipList)) + RegionNil(pGC->pCompositeClip)) return NULL; /* clip the source */ diff --git a/mi/micopy.c b/mi/micopy.c index 4db128c4f..d563ea682 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -154,7 +154,7 @@ miDoCopy(DrawablePtr pSrcDrawable, /* Short cut for unmapped or fully clipped windows */ if (pDstDrawable->type == DRAWABLE_WINDOW && - RegionNil(&((WindowPtr)pDstDrawable)->clipList)) { + RegionNil(pGC->pCompositeClip)) { return NULL; }