summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2013-06-13 23:38:13 +0200
committerMatt Turner <mattst88@gmail.com>2013-08-16 11:11:46 -0700
commitd7c14dfbac1b50ad484c0070075f060b53783550 (patch)
tree7fbe95c075316ffa542ba5f0332b63562f5f226a
parent005d61313e989bf054b1cc2190f1c743362d86ff (diff)
Unbreak shadowfb initialization with modern X servers.
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434468 Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/neo.h1
-rw-r--r--src/neo_driver.c40
2 files changed, 40 insertions, 1 deletions
diff --git a/src/neo.h b/src/neo.h
index 6812e7a..7b386d4 100644
--- a/src/neo.h
+++ b/src/neo.h
@@ -261,6 +261,7 @@ typedef struct neoRec
vbeInfoPtr pVbe;
unsigned char * ShadowPtr;
int ShadowPitch;
+ CreateScreenResourcesProcPtr CreateScreenResources;
RefreshAreaFuncPtr refreshArea;
void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y);
int rotate;
diff --git a/src/neo_driver.c b/src/neo_driver.c
index a17b925..7e60f3e 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -1401,6 +1401,44 @@ NEOLoadPalette(
}
}
+static Bool
+NEOCreateScreenResources(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ NEOPtr pNeo = NEOPTR(pScrn);
+ PixmapPtr pPixmap;
+ Bool ret;
+
+ pScreen->CreateScreenResources = pNeo->CreateScreenResources;
+ ret = pScreen->CreateScreenResources(pScreen);
+ pScreen->CreateScreenResources = NEOCreateScreenResources;
+
+ if (!ret)
+ return FALSE;
+
+ pPixmap = pScreen->GetScreenPixmap(pScreen);
+
+ if (!shadowAdd(pScreen, pPixmap, neoShadowUpdate,
+ NULL, 0, NULL)) {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static Bool
+NEOShadowInit(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ NEOPtr pNeo = NEOPTR(pScrn);
+
+ if (!shadowSetup(pScreen))
+ return FALSE;
+ pNeo->CreateScreenResources = pScreen->CreateScreenResources;
+ pScreen->CreateScreenResources = NEOCreateScreenResources;
+
+ return TRUE;
+}
+
/* Mandatory */
static Bool
NEOScreenInit(SCREEN_INIT_ARGS_DECL)
@@ -1651,7 +1689,7 @@ NEOScreenInit(SCREEN_INIT_ARGS_DECL)
#if 0
ShadowFBInit(pScreen, nPtr->refreshArea);
#else
- shadowInit (pScreen, neoShadowUpdate, 0);
+ NEOShadowInit (pScreen);
#endif
}