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>
This commit is contained in:
parent
1dd839a425
commit
5c10c7ea21
|
@ -886,6 +886,7 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
||||||
REQUEST(xXFixesSetPictureClipRegionReq);
|
REQUEST(xXFixesSetPictureClipRegionReq);
|
||||||
int result = Success, j;
|
int result = Success, j;
|
||||||
PanoramiXRes *pict;
|
PanoramiXRes *pict;
|
||||||
|
RegionPtr reg = NULL;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
||||||
|
|
||||||
|
@ -896,10 +897,22 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pict->u.pict.root)
|
||||||
|
VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess);
|
||||||
|
|
||||||
FOR_NSCREENS_BACKWARD(j) {
|
FOR_NSCREENS_BACKWARD(j) {
|
||||||
|
ScreenPtr screen = screenInfo.screens[j];
|
||||||
stuff->picture = pict->info[j].id;
|
stuff->picture = pict->info[j].id;
|
||||||
|
|
||||||
|
if (reg)
|
||||||
|
RegionTranslate(reg, -screen->x, -screen->y);
|
||||||
|
|
||||||
result =
|
result =
|
||||||
(*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
|
(*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
|
||||||
|
|
||||||
|
if (reg)
|
||||||
|
RegionTranslate(reg, screen->x, screen->y);
|
||||||
|
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue