aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/composite
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-04-13 14:24:56 +0200
committermarha <marha@users.sourceforge.net>2014-04-13 14:24:56 +0200
commitd2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed (patch)
tree2a860c9d687826b3cb48facfa21c616e14e69347 /xorg-server/composite
parentedb5b380994125bf33929ef7dc5a3c456dfbe93b (diff)
downloadvcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.tar.gz
vcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.tar.bz2
vcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.zip
fontconfig libxcb mesa xserver xcb-proto git update 13 Apr 2014
xserver commit 3028ae6c9aa37168e249e0d847b29f8e3efb05b2 libxcb commit 29e419c5840a1eeda3336a0802686ee723dcaab3 libxcb/xcb-proto commit 70fea02b7d90d86e9d3b0dc5b61406bf4c910999 pixman commit 4b76bbfda670f9ede67d0449f3640605e1fc4df0 fontconfig commit f44157c809d280e2a0ce87fb078fc4b278d24a67 mesa commit 936dda08ee6d7b2be2b016bc06780e401088ec13
Diffstat (limited to 'xorg-server/composite')
-rw-r--r--xorg-server/composite/compext.c13
-rw-r--r--xorg-server/composite/compinit.c24
-rw-r--r--xorg-server/composite/compint.h7
-rw-r--r--xorg-server/composite/compositeext.h4
-rw-r--r--xorg-server/composite/compwindow.c18
5 files changed, 65 insertions, 1 deletions
diff --git a/xorg-server/composite/compext.c b/xorg-server/composite/compext.c
index a945f721f..cadedbd37 100644
--- a/xorg-server/composite/compext.c
+++ b/xorg-server/composite/compext.c
@@ -239,6 +239,7 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
WindowPtr pWin;
CompWindowPtr cw;
PixmapPtr pPixmap;
+ ScreenPtr pScreen;
int rc;
REQUEST(xCompositeNameWindowPixmapReq);
@@ -246,6 +247,8 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
+ pScreen = pWin->drawable.pScreen;
+
if (!pWin->viewable)
return BadMatch;
@@ -255,7 +258,7 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
if (!cw)
return BadMatch;
- pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
+ pPixmap = (*pScreen->GetWindowPixmap) (pWin);
if (!pPixmap)
return BadMatch;
@@ -270,6 +273,14 @@ ProcCompositeNameWindowPixmap(ClientPtr client)
if (!AddResource(stuff->pixmap, RT_PIXMAP, (void *) pPixmap))
return BadAlloc;
+ if (pScreen->NameWindowPixmap) {
+ rc = pScreen->NameWindowPixmap(pWin, pPixmap, stuff->pixmap);
+ if (rc != Success) {
+ FreeResource(stuff->pixmap, RT_NONE);
+ return rc;
+ }
+ }
+
return Success;
}
diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c
index 1db9e0bf5..48e938fac 100644
--- a/xorg-server/composite/compinit.c
+++ b/xorg-server/composite/compinit.c
@@ -229,6 +229,28 @@ CompositeRegisterAlternateVisuals(ScreenPtr pScreen, VisualID * vids,
return compRegisterAlternateVisuals(cs, vids, nVisuals);
}
+Bool
+CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen,
+ VisualID parentVisual,
+ VisualID winVisual)
+{
+ CompScreenPtr cs = GetCompScreen(pScreen);
+ CompImplicitRedirectException *p;
+
+ p = realloc(cs->implicitRedirectExceptions,
+ sizeof(p[0]) * (cs->numImplicitRedirectExceptions + 1));
+ if (p == NULL)
+ return FALSE;
+
+ p[cs->numImplicitRedirectExceptions].parentVisual = parentVisual;
+ p[cs->numImplicitRedirectExceptions].winVisual = winVisual;
+
+ cs->implicitRedirectExceptions = p;
+ cs->numImplicitRedirectExceptions++;
+
+ return TRUE;
+}
+
typedef struct _alternateVisual {
int depth;
CARD32 format;
@@ -349,6 +371,8 @@ compScreenInit(ScreenPtr pScreen)
cs->numAlternateVisuals = 0;
cs->alternateVisuals = NULL;
+ cs->numImplicitRedirectExceptions = 0;
+ cs->implicitRedirectExceptions = NULL;
if (!compAddAlternateVisuals(pScreen, cs)) {
free(cs);
diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h
index 12dc8b3f7..56b76c540 100644
--- a/xorg-server/composite/compint.h
+++ b/xorg-server/composite/compint.h
@@ -119,6 +119,11 @@ typedef struct _CompOverlayClientRec {
XID resource;
} CompOverlayClientRec;
+typedef struct _CompImplicitRedirectException {
+ XID parentVisual;
+ XID winVisual;
+} CompImplicitRedirectException;
+
typedef struct _CompScreen {
PositionWindowProcPtr PositionWindow;
CopyWindowProcPtr CopyWindow;
@@ -155,6 +160,8 @@ typedef struct _CompScreen {
CloseScreenProcPtr CloseScreen;
int numAlternateVisuals;
VisualID *alternateVisuals;
+ int numImplicitRedirectExceptions;
+ CompImplicitRedirectException *implicitRedirectExceptions;
WindowPtr pOverlayWin;
Window overlayWid;
diff --git a/xorg-server/composite/compositeext.h b/xorg-server/composite/compositeext.h
index 0b148f029..b96cb1d68 100644
--- a/xorg-server/composite/compositeext.h
+++ b/xorg-server/composite/compositeext.h
@@ -35,6 +35,10 @@ extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen,
VisualID * vids,
int nVisuals);
+extern _X_EXPORT Bool CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen,
+ VisualID parentVisual,
+ VisualID winVisual);
+
extern _X_EXPORT RESTYPE CompositeClientWindowType;
#endif /* _COMPOSITEEXT_H_ */
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c
index 6c2434959..882429414 100644
--- a/xorg-server/composite/compwindow.c
+++ b/xorg-server/composite/compwindow.c
@@ -336,6 +336,21 @@ compIsAlternateVisual(ScreenPtr pScreen, XID visual)
}
static Bool
+compIsImplicitRedirectException(ScreenPtr pScreen,
+ XID parentVisual, XID winVisual)
+{
+ CompScreenPtr cs = GetCompScreen(pScreen);
+ int i;
+
+ for (i = 0; i < cs->numImplicitRedirectExceptions; i++)
+ if (cs->implicitRedirectExceptions[i].parentVisual == parentVisual &&
+ cs->implicitRedirectExceptions[i].winVisual == winVisual)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool
compImplicitRedirect(WindowPtr pWin, WindowPtr pParent)
{
if (pParent) {
@@ -343,6 +358,9 @@ compImplicitRedirect(WindowPtr pWin, WindowPtr pParent)
XID winVisual = wVisual(pWin);
XID parentVisual = wVisual(pParent);
+ if (compIsImplicitRedirectException(pScreen, parentVisual, winVisual))
+ return FALSE;
+
if (winVisual != parentVisual &&
(compIsAlternateVisual(pScreen, winVisual) ||
compIsAlternateVisual(pScreen, parentVisual)))