[PATCH 13/14] fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2)
Adam Jackson
ajax at redhat.com
Thu Nov 21 14:43:26 PST 2013
Root 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.
v2: Only translate for root windows, since the clip origin is
drawable-relative.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
xfixes/region.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/xfixes/region.c b/xfixes/region.c
index 0e9ca44..f2ae851 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -886,6 +886,7 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
REQUEST(xXFixesSetPictureClipRegionReq);
int result = Success, j;
PanoramiXRes *pict;
+ RegionPtr reg = NULL;
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
@@ -896,10 +897,22 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
return result;
}
+ if (pict->u.pict.root)
+ 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.4.2
More information about the xorg-devel
mailing list