mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
@@ -48,13 +48,9 @@
|
||||
#include "compint.h"
|
||||
#include "compositeext.h"
|
||||
|
||||
static int CompScreenPrivateKeyIndex;
|
||||
DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKeyIndex;
|
||||
static int CompWindowPrivateKeyIndex;
|
||||
DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKeyIndex;
|
||||
static int CompSubwindowsPrivateKeyIndex;
|
||||
DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKeyIndex;
|
||||
|
||||
DevPrivateKeyRec CompScreenPrivateKeyRec;
|
||||
DevPrivateKeyRec CompWindowPrivateKeyRec;
|
||||
DevPrivateKeyRec CompSubwindowsPrivateKeyRec;
|
||||
|
||||
static Bool
|
||||
compCloseScreen (int index, ScreenPtr pScreen)
|
||||
@@ -319,6 +315,13 @@ compScreenInit (ScreenPtr pScreen)
|
||||
{
|
||||
CompScreenPtr cs;
|
||||
|
||||
if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0))
|
||||
return FALSE;
|
||||
if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0))
|
||||
return FALSE;
|
||||
|
||||
if (GetCompScreen (pScreen))
|
||||
return TRUE;
|
||||
cs = (CompScreenPtr) malloc(sizeof (CompScreenRec));
|
||||
|
||||
Reference in New Issue
Block a user