mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-28 21:33:09 +00:00
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.
This commit is contained in:
parent
8554707326
commit
4017d31902
261 changed files with 1642 additions and 3957 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue