Inspired by a identical commit for xf86-video-nouveau by Ilia Mirkin.

Signed-off-by: Emil Velikov <[email protected]>
---

Compile tested only.

 src/radeon_dri2.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 7587a0c..814d751 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -443,8 +443,12 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
     if (translate && drawable->type == DRAWABLE_WINDOW) {
        PixmapPtr pPix = GetDrawablePixmap(drawable);
 
-       off_x = drawable->x - pPix->screen_x;
-       off_y = drawable->y - pPix->screen_y;
+#ifdef COMPOSITE
+       off_x = - pPix->screen_x;
+       off_y = - pPix->screen_y;
+#endif
+       off_x += drawable->x;
+       off_y += drawable->y;
     }
     gc = GetScratchGC(dst_drawable->depth, pScreen);
     copy_clip = REGION_CREATE(pScreen, NULL, 0);
-- 
2.4.4

_______________________________________________
xorg-driver-ati mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to