Dead code cleanup over DBE.
No DDXes have explicit DBE support anymore, so the init registration table never got used. Just nuke it all.
This commit is contained in:
parent
e5eaea599a
commit
88297558aa
83
dbe/dbe.c
83
dbe/dbe.c
|
@ -58,9 +58,6 @@
|
||||||
|
|
||||||
/* GLOBALS */
|
/* 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 */
|
/* These are static globals copied to DBE's screen private for use by DDX */
|
||||||
static int dbeScreenPrivKeyIndex;
|
static int dbeScreenPrivKeyIndex;
|
||||||
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
|
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
|
||||||
|
@ -74,45 +71,6 @@ static RESTYPE dbeWindowPrivResType;
|
||||||
/* Used to generate DBE's BadBuffer error. */
|
/* Used to generate DBE's BadBuffer error. */
|
||||||
static int dbeErrorBase;
|
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
|
* DBE DIX Procedure: DbeStubScreen
|
||||||
|
@ -1498,12 +1456,6 @@ DbeResetProc(ExtensionEntry *extEntry)
|
||||||
xfree(pDbeScreenPriv);
|
xfree(pDbeScreenPriv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We want to init the initialization function table after every server
|
|
||||||
* reset in DbeRegisterFunction().
|
|
||||||
*/
|
|
||||||
firstRegistrationPass = TRUE;
|
|
||||||
|
|
||||||
} /* DbeResetProc() */
|
} /* DbeResetProc() */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1659,39 +1611,8 @@ DbeExtensionInit(void)
|
||||||
pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey;
|
pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey;
|
||||||
pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey;
|
pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey;
|
||||||
|
|
||||||
if(DbeInitFunct[i])
|
|
||||||
{
|
{
|
||||||
/* This screen supports DBE. */
|
/* We don't have DDX support for DBE anymore */
|
||||||
|
|
||||||
/* 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. */
|
|
||||||
|
|
||||||
#ifndef DISABLE_MI_DBE_BY_DEFAULT
|
#ifndef DISABLE_MI_DBE_BY_DEFAULT
|
||||||
/* Setup DIX. */
|
/* Setup DIX. */
|
||||||
|
@ -1723,7 +1644,7 @@ DbeExtensionInit(void)
|
||||||
DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
|
DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} /* else -- this screen does not support DBE. */
|
}
|
||||||
|
|
||||||
} /* for (i = 0; i < screenInfo.numScreens; i++) */
|
} /* for (i = 0; i < screenInfo.numScreens; i++) */
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
/* Marker for free elements in the buffer ID array. */
|
/* Marker for free elements in the buffer ID array. */
|
||||||
#define DBE_FREE_ID_ELEMENT 0
|
#define DBE_FREE_ID_ELEMENT 0
|
||||||
|
|
||||||
|
extern void DbeExtensionInit (void);
|
||||||
|
|
||||||
/* TYPEDEFS */
|
/* TYPEDEFS */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user