summaryrefslogtreecommitdiff
path: root/miext/cw
diff options
context:
space:
mode:
authorSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-04-26 12:41:01 -0400
committerSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-04-26 12:41:01 -0400
commit4fe918b38553133c27e5ae672e5c43984a9bbaea (patch)
treeb3a4b4f679e7fee25dd2daf5b1da8a97399a326d /miext/cw
parent0ff7c94fcf6497ee8575f81cf97eeeb3a857739e (diff)
Fix bug 8871 - scrolling corruption with a compositing manager
Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to generate GraphicsExposes correctly.
Diffstat (limited to 'miext/cw')
-rw-r--r--miext/cw/cw_ops.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/miext/cw/cw_ops.c b/miext/cw/cw_ops.c
index 80b72806c..82ec99999 100644
--- a/miext/cw/cw_ops.c
+++ b/miext/cw/cw_ops.c
@@ -30,6 +30,7 @@
#include "gcstruct.h"
#include "pixmapstr.h"
#include "cw.h"
+#include "mi.h"
#define SETUP_BACKING_DST(_pDst, _pGC) \
cwGCPtr pGCPrivate = getCwGC (_pGC); \
@@ -185,7 +186,7 @@ cwCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
int w, int h, int dstx, int dsty)
{
int odstx, odsty;
- RegionPtr exposed = NULL;
+ int osrcx, osrcy;
SETUP_BACKING_DST(pDst, pGC);
SETUP_BACKING_SRC(pSrc, pGC);
@@ -193,19 +194,20 @@ cwCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
odstx = dstx;
odsty = dsty;
+ osrcx = srcx;
+ osrcy = srcy;
CW_OFFSET_XY_DST(dstx, dsty);
CW_OFFSET_XY_SRC(srcx, srcy);
- exposed = (*pBackingGC->ops->CopyArea)(pBackingSrc, pBackingDst,
- pBackingGC, srcx, srcy, w, h,
- dstx, dsty);
-
- if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
-
+ (*pBackingGC->ops->CopyArea)(pBackingSrc, pBackingDst,
+ pBackingGC, srcx, srcy, w, h,
+ dstx, dsty);
+
EPILOGUE(pGC);
- return exposed;
+ return miHandleExposures(pSrc, pDst, pGC,
+ osrcx, osrcy, w, h,
+ odstx, odsty, 0);
}
static RegionPtr
@@ -213,7 +215,7 @@ cwCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
int w, int h, int dstx, int dsty, unsigned long plane)
{
int odstx, odsty;
- RegionPtr exposed = NULL;
+ int osrcx, osrcy;
SETUP_BACKING_DST(pDst, pGC);
SETUP_BACKING_SRC(pSrc, pGC);
@@ -221,19 +223,20 @@ cwCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
odstx = dstx;
odsty = dsty;
+ osrcx = srcx;
+ osrcy = srcy;
CW_OFFSET_XY_DST(dstx, dsty);
CW_OFFSET_XY_SRC(srcx, srcy);
- exposed = (*pBackingGC->ops->CopyPlane)(pBackingSrc, pBackingDst,
- pBackingGC, srcx, srcy, w, h,
- dstx, dsty, plane);
-
- if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
+ (*pBackingGC->ops->CopyPlane)(pBackingSrc, pBackingDst,
+ pBackingGC, srcx, srcy, w, h,
+ dstx, dsty, plane);
EPILOGUE(pGC);
- return exposed;
+ return miHandleExposures(pSrc, pDst, pGC,
+ osrcx, osrcy, w, h,
+ odstx, odsty, plane);
}
static void