56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
From b355ac5f3ab8cea52ebb61271247cb1cded6f9bf Mon Sep 17 00:00:00 2001
|
|
From: Adam Jackson <ajax@redhat.com>
|
|
Date: Mon, 4 Nov 2013 17:49:33 -0500
|
|
Subject: [PATCH 5/6] fixes: Fix PanoramiXSetPictureClipRegion for window
|
|
pictures
|
|
|
|
Windows in Xinerama are in the coordinate space of their root window
|
|
pixmap, not in protocol space. This fixes 'xcompmgr -n' when Xinerama
|
|
is active.
|
|
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
---
|
|
xfixes/region.c | 15 +++++++++++++++
|
|
1 file changed, 15 insertions(+)
|
|
|
|
diff --git a/xfixes/region.c b/xfixes/region.c
|
|
index 0e9ca44..eb4a082 100644
|
|
--- a/xfixes/region.c
|
|
+++ b/xfixes/region.c
|
|
@@ -886,6 +886,8 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
|
REQUEST(xXFixesSetPictureClipRegionReq);
|
|
int result = Success, j;
|
|
PanoramiXRes *pict;
|
|
+ PicturePtr pPicture;
|
|
+ RegionPtr reg = NULL;
|
|
|
|
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
|
|
|
@@ -896,10 +898,23 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
|
return result;
|
|
}
|
|
|
|
+ VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
|
|
+ if (pPicture->pDrawable && pPicture->pDrawable->type == DRAWABLE_WINDOW)
|
|
+ VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess);
|
|
+
|
|
FOR_NSCREENS_BACKWARD(j) {
|
|
+ ScreenPtr screen = screenInfo.screens[j];
|
|
stuff->picture = pict->info[j].id;
|
|
+
|
|
+ if (reg)
|
|
+ RegionTranslate(reg, -screen->x, -screen->y);
|
|
+
|
|
result =
|
|
(*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
|
|
+
|
|
+ if (reg)
|
|
+ RegionTranslate(reg, screen->x, screen->y);
|
|
+
|
|
if (result != Success)
|
|
break;
|
|
}
|
|
--
|
|
1.8.3.1
|
|
|