mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-08 23:12:27 +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:
parent
c865a24401
commit
faeebead7b
139 changed files with 1105 additions and 711 deletions
|
|
@ -182,10 +182,10 @@ miSpriteIsDown(miCursorInfoPtr pDevCursor)
|
|||
* screen wrappers
|
||||
*/
|
||||
|
||||
static int miSpriteScreenKeyIndex;
|
||||
static DevPrivateKey miSpriteScreenKey = &miSpriteScreenKeyIndex;
|
||||
static int miSpriteDevPrivatesKeyIndex;
|
||||
static DevPrivateKey miSpriteDevPrivatesKey = &miSpriteDevPrivatesKeyIndex;
|
||||
static DevPrivateKeyRec miSpriteScreenKeyRec;
|
||||
#define miSpriteScreenKey (&miSpriteScreenKeyRec)
|
||||
static DevPrivateKeyRec miSpriteDevPrivatesKeyRec;
|
||||
#define miSpriteDevPrivatesKey (&miSpriteDevPrivatesKeyRec)
|
||||
|
||||
static Bool miSpriteCloseScreen(int i, ScreenPtr pScreen);
|
||||
static void miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy,
|
||||
|
|
@ -293,6 +293,12 @@ miSpriteInitialize (ScreenPtr pScreen,
|
|||
if (!DamageSetup (pScreen))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&miSpriteScreenKeyRec, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&miSpriteDevPrivatesKeyRec, PRIVATE_DEVICE, 0))
|
||||
return FALSE;
|
||||
|
||||
pScreenPriv = malloc(sizeof (miSpriteScreenRec));
|
||||
if (!pScreenPriv)
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue