aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dbe/dbe.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
commit2553bdd7c359cd87525d367761c86932cec5adff (patch)
treeae71245933c98474a699d3e392de5820879b2018 /xorg-server/dbe/dbe.c
parente2c51f2ee7b0a3ea1a052fc49324057b4a4bbc78 (diff)
parent4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (diff)
downloadvcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.gz
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.bz2
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.zip
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/dbe/dbe.c')
-rw-r--r--xorg-server/dbe/dbe.c92
1 files changed, 7 insertions, 85 deletions
diff --git a/xorg-server/dbe/dbe.c b/xorg-server/dbe/dbe.c
index d34708d38..ff9df7f9f 100644
--- a/xorg-server/dbe/dbe.c
+++ b/xorg-server/dbe/dbe.c
@@ -58,12 +58,11 @@
/* GLOBALS */
-/* Per-screen initialization functions [init'ed by DbeRegisterFunction()] */
-static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */
-
/* These are static globals copied to DBE's screen private for use by DDX */
-static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKey;
-static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKey;
+static int dbeScreenPrivKeyIndex;
+static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
+static int dbeWindowPrivKeyIndex;
+static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKeyIndex;
/* These are static globals copied to DBE's screen private for use by DDX */
static RESTYPE dbeDrawableResType;
@@ -72,45 +71,6 @@ static RESTYPE dbeWindowPrivResType;
/* Used to generate DBE's BadBuffer error. */
static int dbeErrorBase;
-/* Used by DbeRegisterFunction() to initialize the initialization function
- * table only once per server lifetime.
- */
-static Bool firstRegistrationPass = TRUE;
-
-
-/******************************************************************************
- *
- * DBE DIX Procedure: DbeRegisterFunction
- *
- * Description:
- *
- * This function registers the DBE init function for the specified screen.
- *
- *****************************************************************************/
-
-void
-DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) (/* ??? */))
-{
- int i;
-
- /* Initialize the initialization function table if it has not been
- * initialized already.
- */
- if (firstRegistrationPass)
- {
- for (i = 0; i < MAXSCREENS; i++)
- {
- DbeInitFunct[i] = NULL;
- }
-
- firstRegistrationPass = FALSE;
- }
-
- DbeInitFunct[pScreen->myNum] = funct;
-
-} /* DbeRegisterFunction() */
-
-
/******************************************************************************
*
* DBE DIX Procedure: DbeStubScreen
@@ -295,10 +255,9 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
* Allocate a window priv.
*/
- pDbeWindowPriv = (DbeWindowPrivPtr)xalloc(sizeof(DbeWindowPrivRec));
+ pDbeWindowPriv = xcalloc(1, sizeof(DbeWindowPrivRec));
if (!pDbeWindowPriv)
return(BadAlloc);
- bzero(pDbeWindowPriv, sizeof(DbeWindowPrivRec));
/* Fill out window priv information. */
pDbeWindowPriv->pWindow = pWin;
@@ -1497,12 +1456,6 @@ DbeResetProc(ExtensionEntry *extEntry)
xfree(pDbeScreenPriv);
}
}
-
- /* We want to init the initialization function table after every server
- * reset in DbeRegisterFunction().
- */
- firstRegistrationPass = TRUE;
-
} /* DbeResetProc() */
@@ -1658,39 +1611,8 @@ DbeExtensionInit(void)
pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey;
pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey;
- if(DbeInitFunct[i])
{
- /* This screen supports DBE. */
-
- /* Setup DIX. */
- pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter;
-
- /* Setup DDX. */
- ddxInitSuccess = (*DbeInitFunct[i])(pScreen, pDbeScreenPriv);
-
- /* DDX DBE initialization may have the side affect of
- * reallocating pDbeScreenPriv, so we need to update it.
- */
- pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
-
- if (ddxInitSuccess)
- {
- /* Wrap DestroyWindow. The DDX initialization function
- * already wrapped PositionWindow for us.
- */
-
- pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow;
- pScreen->DestroyWindow = DbeDestroyWindow;
- }
- else
- {
- /* DDX initialization failed. Stub the screen. */
- DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
- }
- }
- else
- {
- /* This screen does not support DBE. */
+ /* We don't have DDX support for DBE anymore */
#ifndef DISABLE_MI_DBE_BY_DEFAULT
/* Setup DIX. */
@@ -1722,7 +1644,7 @@ DbeExtensionInit(void)
DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
#endif
- } /* else -- this screen does not support DBE. */
+ }
} /* for (i = 0; i < screenInfo.numScreens; i++) */