diff options
author | Keith Packard <keithp@keithp.com> | 2010-04-26 17:22:21 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-06-05 19:23:03 -0700 |
commit | faeebead7bfcc78535757ca7acc1faf7554c03b7 (patch) | |
tree | 1a8f13a3b1ae968011efb9679bc3ed79a29020be /hw/xnest/Screen.c | |
parent | c865a24401f06bcf1347d8b41f736a066ab25693 (diff) |
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>
Diffstat (limited to 'hw/xnest/Screen.c')
-rw-r--r-- | hw/xnest/Screen.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 0a05ac8da..957fe4cdb 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -45,8 +45,7 @@ is" without express or implied warranty. Window xnestDefaultWindows[MAXSCREENS]; Window xnestScreenSaverWindows[MAXSCREENS]; -static int xnestCursorScreenKeyIndex; -DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKeyIndex; +DevPrivateKeyRec xnestCursorScreenKeyRec; ScreenPtr xnestScreen(Window window) @@ -146,10 +145,14 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) int rootDepth; miPointerScreenPtr PointPriv; - if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin))) - return False; - if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC))) - return False; + if (!dixRegisterPrivateKey(&xnestWindowPrivateKeyRec, PRIVATE_WINDOW, sizeof(xnestPrivWin))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestGCPrivateKeyRec, PRIVATE_GC, sizeof(xnestPrivGC))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof (xnestPrivPixmap))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; visuals = (VisualPtr)malloc(xnestNumVisuals * sizeof(VisualRec)); numVisuals = 0; |