diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
commit | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch) | |
tree | c1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/dbe/dbe.c | |
parent | dc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff) | |
download | vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2 vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip |
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/dbe/dbe.c')
-rw-r--r-- | xorg-server/dbe/dbe.c | 92 |
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++) */ |