[PATCH 1/2] fixes: Fix PanoramiXSetPictureClipRegion for window pictures
Adam Jackson
ajax at redhat.com
Mon Nov 4 23:49:33 CET 2013
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 at redhat.com>
---
xfixes/region.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/xfixes/region.c b/xfixes/region.c
index b7b0e24..be0c886 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -884,6 +884,8 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
REQUEST(xXFixesSetPictureClipRegionReq);
int result = Success, j;
PanoramiXRes *pict;
+ PicturePtr pPicture;
+ RegionPtr reg = NULL;
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
@@ -894,10 +896,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
More information about the xorg-devel
mailing list