summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-11-04 17:49:34 -0500
committerAdam Jackson <ajax@redhat.com>2013-12-09 13:20:37 -0500
commit808303fe5232ba0320ae5a4310b1ed1322e85f1d (patch)
treea5461625bdbc566b0e485ad5ba700e0f9157c835
parent5c10c7ea2129b70015e745523918d143cc29318d (diff)
fixes: Fix PanoramiXSetWindowShapeRegion for root windows (v2)
Root windows in Xinerama are in the coordinate space of their root window pixmap, not in protocol space. v2: Only translate for root windows, sice the window shape is drawable-relative. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--xfixes/region.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index f2ae8511a..14a02ba1d 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -857,6 +857,7 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client)
{
int result = Success, j;
PanoramiXRes *win;
+ RegionPtr reg = NULL;
REQUEST(xXFixesSetWindowShapeRegionReq);
@@ -869,10 +870,22 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client)
return result;
}
+ if (win->u.win.root)
+ VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess);
+
FOR_NSCREENS_FORWARD(j) {
+ ScreenPtr screen = screenInfo.screens[j];
stuff->dest = win->info[j].id;
+
+ if (reg)
+ RegionTranslate(reg, -screen->x, -screen->y);
+
result =
(*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client);
+
+ if (reg)
+ RegionTranslate(reg, screen->x, screen->y);
+
if (result != Success)
break;
}