summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2015-07-14 19:23:01 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2015-07-14 19:25:34 -0400
commit5212dbd7e5eba35fdd6578b30f5b0c8c8543081b (patch)
tree8ca844d0e73060ab2c013709adb1da1c473d48b7
parentfdc528306e4018b314f2efcb2be4e37672bddd75 (diff)
Avoid build fail without COMPOSITE
Reviewed-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/nouveau_dri2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index f22e319..ce6f53e 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -170,9 +170,13 @@ nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegio
}
if (translate && pDraw->type == DRAWABLE_WINDOW) {
+#ifdef COMPOSITE
PixmapPtr pPix = get_drawable_pixmap(pDraw);
- off_x = pDraw->x - pPix->screen_x;
- off_y = pDraw->y - pPix->screen_y;
+ off_x = -pPix->screen_x;
+ off_y = -pPix->screen_y;
+#endif
+ off_x += pDraw->x;
+ off_y += pDraw->y;
}
pGC = GetScratchGC(pDraw->depth, pScreen);