summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-11-04 17:49:33 -0500
committerAdam Jackson <ajax@redhat.com>2013-12-09 13:20:36 -0500
commit5c10c7ea2129b70015e745523918d143cc29318d (patch)
treebaccf71a4e920783bf33c24180fd96d4f83336a5 /xfixes
parent1dd839a425adc6e5a1dc377003ed86a374d81f0b (diff)
fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2)
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. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/region.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index 0e9ca443f..f2ae8511a 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;
}