aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/shadowfb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-23 19:36:09 +0200
committermarha <marha@users.sourceforge.net>2014-05-23 19:38:24 +0200
commit63bfcd0be46413dda8c22b914d12f66ea5d5c66d (patch)
tree252bfea78ff3ccfabedc3b84c8a7331c74e902cd /xorg-server/hw/xfree86/shadowfb
parent55cf29d7f748b814a2b8eb016fbf15635d56aa53 (diff)
downloadvcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.tar.gz
vcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.tar.bz2
vcxsrv-63bfcd0be46413dda8c22b914d12f66ea5d5c66d.zip
libX11 mesa xserver pixman git update 23 May 2014
xserver commit db2e708f31a162c6c66643d3559dd5f3e21ee06b libX11 commit e3dc0d17339e61eaf0b51b8907510984e3bf23cb pixman commit 9cd283b2eb8279824406bfd47b020d21fc00cf82 mesa commit 404387ecd72a4a9ace8c1fa6895823aabfd759ad
Diffstat (limited to 'xorg-server/hw/xfree86/shadowfb')
-rw-r--r--xorg-server/hw/xfree86/shadowfb/shadow.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/xorg-server/hw/xfree86/shadowfb/shadow.c b/xorg-server/hw/xfree86/shadowfb/shadow.c
index 10f72cc99..d2481ed8a 100644
--- a/xorg-server/hw/xfree86/shadowfb/shadow.c
+++ b/xorg-server/hw/xfree86/shadowfb/shadow.c
@@ -29,14 +29,14 @@
#include "picturestr.h"
static Bool ShadowCloseScreen(ScreenPtr pScreen);
-static Bool ShadowCreateScreenResources(ScreenPtr pScreen);
+static Bool ShadowCreateRootWindow(WindowPtr pWin);
typedef struct {
ScrnInfoPtr pScrn;
RefreshAreaFuncPtr preRefresh;
RefreshAreaFuncPtr postRefresh;
CloseScreenProcPtr CloseScreen;
- CreateScreenResourcesProcPtr CreateScreenResources;
+ CreateWindowProcPtr CreateWindow;
} ShadowScreenRec, *ShadowScreenPtr;
static DevPrivateKeyRec ShadowScreenKeyRec;
@@ -71,10 +71,10 @@ ShadowFBInit2(ScreenPtr pScreen,
pPriv->postRefresh = postRefreshArea;
pPriv->CloseScreen = pScreen->CloseScreen;
- pPriv->CreateScreenResources = pScreen->CreateScreenResources;
+ pPriv->CreateWindow = pScreen->CreateWindow;
pScreen->CloseScreen = ShadowCloseScreen;
- pScreen->CreateScreenResources = ShadowCreateScreenResources;
+ pScreen->CreateWindow = ShadowCreateRootWindow;
return TRUE;
}
@@ -117,16 +117,21 @@ shadowfbReportPost(DamagePtr damage, RegionPtr reg, void *closure)
}
static Bool
-ShadowCreateScreenResources(ScreenPtr pScreen)
+ShadowCreateRootWindow(WindowPtr pWin)
{
Bool ret;
- WindowPtr pWin = pScreen->root;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
- pScreen->CreateScreenResources = pPriv->CreateScreenResources;
- ret = pScreen->CreateScreenResources(pScreen);
- pPriv->CreateScreenResources = pScreen->CreateScreenResources;
- pScreen->CreateScreenResources = ShadowCreateScreenResources;
+ /* paranoia */
+ if (pWin != pScreen->root)
+ ErrorF("ShadowCreateRootWindow called unexpectedly\n");
+
+ /* call down, but don't hook ourselves back in; we know the first time
+ * we're called it's for the root window.
+ */
+ pScreen->CreateWindow = pPriv->CreateWindow;
+ ret = pScreen->CreateWindow(pWin);
/* this might look like it leaks, but the damage code reaps listeners
* when their drawable disappears.
@@ -159,7 +164,6 @@ ShadowCloseScreen(ScreenPtr pScreen)
ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
pScreen->CloseScreen = pPriv->CloseScreen;
- pScreen->CreateScreenResources = pPriv->CreateScreenResources;
free(pPriv);