diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-28 09:28:25 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-28 09:28:25 -0400 |
commit | 4017d3190234e189a0bbd33193a148d4d3c7556b (patch) | |
tree | 2ab228113d410386afde50c893f137d95974b8f3 /dix/getevents.c | |
parent | 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (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 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index 68993030d..a12bcfd78 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -725,7 +725,8 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) KeyClassPtr ckeyc = inputInfo.keyboard->key; int i = 0; - if (inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { + if (pDev != dixLookupPrivate(&inputInfo.keyboard->devPrivates, + CoreDevicePrivateKey)) { memcpy(ckeyc->modifierMap, pDev->key->modifierMap, MAP_LENGTH); if (ckeyc->modifierKeyMap) xfree(ckeyc->modifierKeyMap); @@ -769,7 +770,8 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) (ckeyc->curKeySyms.maxKeyCode - ckeyc->curKeySyms.minKeyCode), serverClient); - inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + dixSetPrivate(&inputInfo.keyboard->devPrivates, CoreDevicePrivateKey, + pDev); } } @@ -783,8 +785,10 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) _X_EXPORT void SwitchCorePointer(DeviceIntPtr pDev) { - if (inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) - inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + if (pDev != dixLookupPrivate(&inputInfo.pointer->devPrivates, + CoreDevicePrivateKey)) + dixSetPrivate(&inputInfo.pointer->devPrivates, + CoreDevicePrivateKey, pDev); } |