summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-10-01 21:42:01 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-10-01 21:42:01 +0930
commit113011221a4fcbd70bc592930b35f20d55809f1e (patch)
treec473101239bd3bb2fe5641d98110af0f47493468
parenta511c445debbd13e8c48146ecd2d7c97e793f788 (diff)
Xi, xfree86: Remove leftovers of the XI wrapper code.
-rw-r--r--Xi/exevents.c56
-rw-r--r--hw/xfree86/common/xf86Xinput.c14
2 files changed, 2 insertions, 68 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 35669061e..1bcc101a7 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -89,64 +89,12 @@ Bool ShouldFreeInputMasks(WindowPtr /* pWin */ ,
static Bool MakeInputMasks(WindowPtr /* pWin */
);
-static int xiDevPrivateIndex = 0;
-static int _xiServerGeneration = -1;
-
-typedef struct {
- ProcessInputProc processInputProc;
- ProcessInputProc realInputProc;
-} xiDevPrivateRec, *xiDevPrivatePtr;
-
-/**************************************************************************
- *
- * Procedures for extension device event routing.
- *
- */
-
-#define WRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \
- saveprocs->processInputProc = \
- saveprocs->realInputProc = device->public.realInputProc; \
- device->public.processInputProc = newproc; \
- device->public.realInputProc = newproc
-
-#define UNWRAP_PROCESS_INPUT_PROC(device, saveprocs, backupproc) \
- backupproc = device->public.processInputProc; \
- device->public.processInputProc = saveprocs->processInputProc; \
- device->public.realInputProc = saveprocs->realInputProc;
-
-#define REWRAP_PROCESS_INPUT_PROC(device, saveprocs, newproc) \
- if (device->public.processInputProc == device->public.realInputProc) \
- device->public.processInputProc = newproc; \
- saveprocs->processInputProc = \
- saveprocs->realInputProc = device->public.realInputProc; \
- device->public.realInputProc = newproc;
void
RegisterOtherDevice(DeviceIntPtr device)
{
- xiDevPrivatePtr xiPrivPtr;
-
- if (serverGeneration != _xiServerGeneration)
- {
- xiDevPrivateIndex = AllocateDevicePrivateIndex();
- if (xiDevPrivateIndex == 1)
- {
- FatalError("[Xi] Could not allocate private index.\n");
- }
- _xiServerGeneration = serverGeneration;
- }
-
- if (!AllocateDevicePrivate(device, xiDevPrivateIndex))
- FatalError("[Xi] Dev private allocation failed.\n");
-
-
- xiPrivPtr = (xiDevPrivatePtr)xcalloc(1, sizeof(xiDevPrivateRec));
- if (!xiPrivPtr)
- FatalError("[Xi] Cannot get memory for dev private.\n");
-
- device->devPrivates[xiDevPrivateIndex].ptr = xiPrivPtr;
-
- WRAP_PROCESS_INPUT_PROC(device, xiPrivPtr, ProcessOtherEvent);
+ device->public.processInputProc = ProcessOtherEvent;
+ device->public.realInputProc = ProcessOtherEvent;
}
/**
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a43230e14..a458c1119 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -181,24 +181,10 @@ xf86ActivateDevice(LocalDevicePtr local)
if (DeviceIsPointerType(dev))
{
-#ifdef XKB
- dev->public.processInputProc = CoreProcessPointerEvent;
- dev->public.realInputProc = CoreProcessPointerEvent;
-#else
- dev->public.processInputProc = ProcessPointerEvent;
- dev->public.realInputProc = ProcessPointerEvent;
-#endif
dev->deviceGrab.ActivateGrab = ActivatePointerGrab;
dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab;
} else
{
-#ifdef XKB
- dev->public.processInputProc = CoreProcessKeyboardEvent;
- dev->public.realInputProc = CoreProcessKeyboardEvent;
-#else
- dev->public.processInputProc = ProcessKeyboardEvent;
- dev->public.realInputProc = ProcessKeyboardEvent;
-#endif
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
}