summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /xkb
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/ddxFakeMtn.c2
-rw-r--r--xkb/xkbActions.c13
2 files changed, 3 insertions, 12 deletions
diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c
index 1060afe99..320e0ca33 100644
--- a/xkb/ddxFakeMtn.c
+++ b/xkb/ddxFakeMtn.c
@@ -107,7 +107,7 @@ ScreenPtr pScreen, oldScreen;
oldY= y;
else oldY+= y;
-#define GetScreenPrivate(s) ((miPointerScreenPtr) ((s)->devPrivates[miPointerScreenIndex].ptr))
+#define GetScreenPrivate(s) ((miPointerScreenPtr)dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey))
(*(GetScreenPrivate(oldScreen))->screenFuncs->CursorOffScreen)
(&pScreen, &oldX, &oldY);
}
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 2e0c89fc2..7f0f74db1 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -40,8 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkb.h"
#include <ctype.h>
-static unsigned int _xkbServerGeneration;
-static int xkbDevicePrivateIndex = -1;
+static DevPrivateKey xkbDevicePrivateKey = &xkbDevicePrivateKey;
static void
xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc,
@@ -64,20 +63,12 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc)
{
xkbDeviceInfoPtr xkbPrivPtr;
- if (serverGeneration != _xkbServerGeneration) {
- if ((xkbDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1)
- return;
- _xkbServerGeneration = serverGeneration;
- }
- if (!AllocateDevicePrivate(device, xkbDevicePrivateIndex))
- return;
-
xkbPrivPtr = (xkbDeviceInfoPtr) xalloc(sizeof(xkbDeviceInfoRec));
if (!xkbPrivPtr)
return;
xkbPrivPtr->unwrapProc = NULL;
- device->devPrivates[xkbDevicePrivateIndex].ptr = xkbPrivPtr;
+ dixSetPrivate(&device->devPrivates, xkbDevicePrivateKey, xkbPrivPtr);
WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr,
proc,xkbUnwrapProc);
}