|
|
70130e |
From b355ac5f3ab8cea52ebb61271247cb1cded6f9bf Mon Sep 17 00:00:00 2001
|
|
|
70130e |
From: Adam Jackson <ajax@redhat.com>
|
|
|
70130e |
Date: Mon, 4 Nov 2013 17:49:33 -0500
|
|
|
70130e |
Subject: [PATCH 5/6] fixes: Fix PanoramiXSetPictureClipRegion for window
|
|
|
70130e |
pictures
|
|
|
70130e |
|
|
|
70130e |
Windows in Xinerama are in the coordinate space of their root window
|
|
|
70130e |
pixmap, not in protocol space. This fixes 'xcompmgr -n' when Xinerama
|
|
|
70130e |
is active.
|
|
|
70130e |
|
|
|
70130e |
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
|
70130e |
---
|
|
|
70130e |
xfixes/region.c | 15 +++++++++++++++
|
|
|
70130e |
1 file changed, 15 insertions(+)
|
|
|
70130e |
|
|
|
70130e |
diff --git a/xfixes/region.c b/xfixes/region.c
|
|
|
70130e |
index 0e9ca44..eb4a082 100644
|
|
|
70130e |
--- a/xfixes/region.c
|
|
|
70130e |
+++ b/xfixes/region.c
|
|
|
70130e |
@@ -886,6 +886,8 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
|
|
70130e |
REQUEST(xXFixesSetPictureClipRegionReq);
|
|
|
70130e |
int result = Success, j;
|
|
|
70130e |
PanoramiXRes *pict;
|
|
|
70130e |
+ PicturePtr pPicture;
|
|
|
70130e |
+ RegionPtr reg = NULL;
|
|
|
70130e |
|
|
|
70130e |
REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
|
|
|
70130e |
|
|
|
70130e |
@@ -896,10 +898,23 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client)
|
|
|
70130e |
return result;
|
|
|
70130e |
}
|
|
|
70130e |
|
|
|
70130e |
+ VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
|
|
|
70130e |
+ if (pPicture->pDrawable && pPicture->pDrawable->type == DRAWABLE_WINDOW)
|
|
|
70130e |
+ VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess);
|
|
|
70130e |
+
|
|
|
70130e |
FOR_NSCREENS_BACKWARD(j) {
|
|
|
70130e |
+ ScreenPtr screen = screenInfo.screens[j];
|
|
|
70130e |
stuff->picture = pict->info[j].id;
|
|
|
70130e |
+
|
|
|
70130e |
+ if (reg)
|
|
|
70130e |
+ RegionTranslate(reg, -screen->x, -screen->y);
|
|
|
70130e |
+
|
|
|
70130e |
result =
|
|
|
70130e |
(*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
|
|
|
70130e |
+
|
|
|
70130e |
+ if (reg)
|
|
|
70130e |
+ RegionTranslate(reg, screen->x, screen->y);
|
|
|
70130e |
+
|
|
|
70130e |
if (result != Success)
|
|
|
70130e |
break;
|
|
|
70130e |
}
|
|
|
70130e |
--
|
|
|
70130e |
1.8.3.1
|
|
|
70130e |
|