summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-10-16 16:09:23 +1000
committerDave Airlie <airlied@redhat.com>2012-10-16 16:09:23 +1000
commite3519be285bdab50ef2193f98826a351a4414fae (patch)
tree40b340cff55d3a1641b6e81843c1bef8366d190e /src
parentbd9e2c064d93afbe4ab84febb2a43ae6a95ab17b (diff)
radeon/dri2: fix the window->pixmap math properly.
Okay kwin did things different, and I really hope this time this is the correct transformation operation. It works here with gears under kwin and under mutter and under xcompmgr. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/radeon_dri2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index f8439d2d..ebd813cc 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -596,9 +596,10 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
}
if (translate && drawable->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)drawable;
- off_x = pWin->origin.x;
- off_y = pWin->origin.y;
+ PixmapPtr pPix = GetDrawablePixmap(drawable);
+
+ off_x = drawable->x - pPix->screen_x;
+ off_y = drawable->y - pPix->screen_y;
}
gc = GetScratchGC(dst_drawable->depth, pScreen);
copy_clip = REGION_CREATE(pScreen, NULL, 0);