mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-25 01:49:58 +00:00
Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac
This commit is contained in:
parent
1d0438de17
commit
e251c9e75a
28 changed files with 12 additions and 135 deletions
|
|
@ -63,13 +63,9 @@
|
|||
#define DMX_COMMON_XKB DMX_COMMON_OTHER
|
||||
#endif
|
||||
|
||||
#ifdef XINPUT
|
||||
#define DMX_COMMON_PRIVATE \
|
||||
DMX_COMMON_XKB; \
|
||||
XDevice *xi
|
||||
#else
|
||||
#define DMX_COMMON_PRIVATE DMX_COMMON_OTHER
|
||||
#endif
|
||||
|
||||
#define GETONLYPRIVFROMPRIVATE \
|
||||
myPrivate *priv = private
|
||||
|
|
|
|||
|
|
@ -79,10 +79,8 @@
|
|||
#include "inputstr.h"
|
||||
#include "scrnintstr.h" /* For screenInfo */
|
||||
|
||||
#ifdef XINPUT
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#define EXTENSION_PROC_ARGS void *
|
||||
#endif
|
||||
|
||||
#if DMX_EQ_DEBUG
|
||||
#define DMXDBG2(f,a,b) dmxLog(dmxDebug,f,a,b)
|
||||
|
|
@ -100,9 +98,7 @@
|
|||
typedef struct _Event {
|
||||
xEvent event; /**< Event. */
|
||||
ScreenPtr pScreen; /**< Screen on which event occurred. */
|
||||
#ifdef XINPUT
|
||||
deviceValuator valuator; /**< XInput device valuator information. */
|
||||
#endif
|
||||
} EventRec, *EventPtr;
|
||||
|
||||
/** Event queue. */
|
||||
|
|
@ -183,15 +179,11 @@ void dmxeqEnqueue(xEvent *e)
|
|||
|
||||
/* Store the event in the queue */
|
||||
dmxEventQueue.events[oldtail].event = *e;
|
||||
#ifdef XINPUT
|
||||
{
|
||||
/* If this is an XInput event, store the
|
||||
* valuator event, too */
|
||||
deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)e;
|
||||
if (e->u.u.type >= LASTEvent && (ev->deviceid & MORE_EVENTS))
|
||||
dmxEventQueue.events[oldtail].valuator = *(deviceValuator *)(ev+1);
|
||||
}
|
||||
#endif
|
||||
/* If this is an XInput event, store the
|
||||
* valuator event, too */
|
||||
deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)e;
|
||||
if (e->u.u.type >= LASTEvent && (ev->deviceid & MORE_EVENTS))
|
||||
dmxEventQueue.events[oldtail].valuator = *(deviceValuator *)(ev+1);
|
||||
|
||||
/* Make sure that event times don't go
|
||||
* backwards - this is "unnecessary",
|
||||
|
|
@ -211,7 +203,6 @@ void dmxeqSwitchScreen(ScreenPtr pScreen, Bool fromDIX)
|
|||
if (fromDIX) dmxEventQueue.pDequeueScreen = pScreen;
|
||||
}
|
||||
|
||||
#ifdef XINPUT
|
||||
static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e)
|
||||
{
|
||||
deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)xe;
|
||||
|
|
@ -238,7 +229,6 @@ static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e)
|
|||
pDevice->public.processInputProc(xe, pDevice, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This function is called from #ProcessInputEvents() to remove events
|
||||
|
|
@ -285,11 +275,8 @@ void dmxeqProcessInputEvents(void)
|
|||
(DeviceIntPtr)dmxEventQueue.pKbd, 1);
|
||||
break;
|
||||
default:
|
||||
#ifdef XINPUT
|
||||
dmxeqProcessXInputEvent(xe, e);
|
||||
break;
|
||||
#endif
|
||||
/* ifndef XINPUT, fall through */
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
case MotionNotify:
|
||||
|
|
|
|||
|
|
@ -57,9 +57,7 @@
|
|||
#include "mipointer.h"
|
||||
#include "mi.h"
|
||||
|
||||
#ifdef XINPUT
|
||||
#include "XIstubs.h"
|
||||
#endif
|
||||
|
||||
static int dmxGlobalX, dmxGlobalY; /* Global cursor position */
|
||||
static int dmxGlobalInvalid; /* Flag indicating dmxCoreMotion
|
||||
|
|
@ -154,7 +152,6 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef XINPUT
|
||||
static void dmxEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, xEvent *e,
|
||||
DMXBlockType block)
|
||||
{
|
||||
|
|
@ -208,7 +205,6 @@ static void dmxEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal, xEvent *e,
|
|||
if (block)
|
||||
dmxSigioUnblock();
|
||||
}
|
||||
#endif
|
||||
|
||||
DMXScreenInfo *dmxFindFirstScreen(int x, int y)
|
||||
{
|
||||
|
|
@ -331,7 +327,6 @@ dmxCoreMotion(DevicePtr pDev, int x, int y, int delta, DMXBlockType block)
|
|||
|
||||
|
||||
|
||||
#ifdef XINPUT
|
||||
#define DMX_MAX_AXES 32 /* Max axes reported by this routine */
|
||||
static void dmxExtMotion(DMXLocalInputInfoPtr dmxLocal,
|
||||
int *v, int firstAxis, int axesCount,
|
||||
|
|
@ -537,7 +532,6 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dmxGetButtonMapping(DMXLocalInputInfoPtr dmxLocal, int button)
|
||||
{
|
||||
|
|
@ -578,14 +572,12 @@ void dmxInvalidateGlobalPosition(void)
|
|||
void dmxMotion(DevicePtr pDev, int *v, int firstAxes, int axesCount,
|
||||
DMXMotionType type, DMXBlockType block)
|
||||
{
|
||||
#ifdef XINPUT
|
||||
GETDMXLOCALFROMPDEV;
|
||||
|
||||
if (!dmxLocal->sendsCore) {
|
||||
dmxExtMotion(dmxLocal, v, firstAxes, axesCount, type, block);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (axesCount == 2) {
|
||||
switch (type) {
|
||||
case DMX_RELATIVE:
|
||||
|
|
@ -739,17 +731,13 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
|||
* control of the input device LEDs. */
|
||||
return;
|
||||
default:
|
||||
#ifdef XINPUT
|
||||
if (type == ProximityIn || type == ProximityOut) {
|
||||
if (dmxLocal->sendsCore)
|
||||
return; /* Not a core event */
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (type >= LASTEvent) {
|
||||
#ifdef XINPUT
|
||||
if (dmxTranslateAndEnqueueExtEvent(dmxLocal, e, block))
|
||||
#endif
|
||||
dmxLogInput(dmxInput, "Unhandled extension event: %d\n", type);
|
||||
} else {
|
||||
dmxLogInput(dmxInput, "Unhandled event: %d (%s)\n",
|
||||
|
|
@ -764,11 +752,9 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
|||
xE.u.u.detail = detail;
|
||||
xE.u.keyButtonPointer.time = GetTimeInMillis();
|
||||
|
||||
#ifdef XINPUT
|
||||
if (!dmxLocal->sendsCore)
|
||||
dmxEnqueueExtEvent(dmxLocal, &xE, block);
|
||||
else
|
||||
#endif
|
||||
dmxeqEnqueue(&xE);
|
||||
#endif /*00*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,13 +73,11 @@
|
|||
#include "windowstr.h"
|
||||
#include "mi.h"
|
||||
|
||||
#ifdef XINPUT
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#include "exevents.h"
|
||||
#define EXTENSION_PROC_ARGS void *
|
||||
#include "extinit.h"
|
||||
#endif
|
||||
|
||||
/* From XI.h */
|
||||
#ifndef Relative
|
||||
|
|
@ -462,9 +460,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
|||
GETDMXINPUTFROMPDEVICE;
|
||||
int fd;
|
||||
DMXLocalInitInfo info;
|
||||
#ifdef XINPUT
|
||||
int i;
|
||||
#endif
|
||||
|
||||
if (dmxInput->detached) return Success;
|
||||
|
||||
|
|
@ -504,41 +500,33 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
|
|||
GetMaximumEventsNum(),
|
||||
#endif
|
||||
Relative);
|
||||
#ifdef XINPUT
|
||||
for (i = 0; i < info.numRelAxes; i++)
|
||||
InitValuatorAxisStruct(pDevice, i, info.minval[0],
|
||||
info.maxval[0], info.res[0],
|
||||
info.minres[0], info.maxres[0]);
|
||||
#endif
|
||||
} else if (info.numRelAxes) {
|
||||
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
|
||||
dmxPointerGetMotionEvents,
|
||||
dmxPointerGetMotionBufferSize(),
|
||||
Relative);
|
||||
#ifdef XINPUT
|
||||
for (i = 0; i < info.numRelAxes; i++)
|
||||
InitValuatorAxisStruct(pDevice, i, info.minval[0],
|
||||
info.maxval[0], info.res[0],
|
||||
info.minres[0], info.maxres[0]);
|
||||
#endif
|
||||
} else if (info.numAbsAxes) {
|
||||
InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
|
||||
dmxPointerGetMotionEvents,
|
||||
dmxPointerGetMotionBufferSize(),
|
||||
Absolute);
|
||||
#ifdef XINPUT
|
||||
for (i = 0; i < info.numAbsAxes; i++)
|
||||
InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
|
||||
info.minval[i+1], info.maxval[i+1],
|
||||
info.res[i+1], info.minres[i+1],
|
||||
info.maxres[i+1]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (info.focusClass) InitFocusClassDeviceStruct(pDevice);
|
||||
#ifdef XINPUT
|
||||
if (info.proximityClass) InitProximityClassDeviceStruct(pDevice);
|
||||
#endif
|
||||
if (info.ptrFeedbackClass)
|
||||
InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl);
|
||||
if (info.kbdFeedbackClass)
|
||||
|
|
@ -759,17 +747,10 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XINPUT
|
||||
if (!name) {
|
||||
name = "extension";
|
||||
registerProcPtr = RegisterOtherDevice;
|
||||
}
|
||||
#else
|
||||
if (!name)
|
||||
dmxLog(dmxFatal,
|
||||
"Server not build with XINPUT support (cannot add %s)\n",
|
||||
dmxLocal->name);
|
||||
#endif
|
||||
|
||||
if (!name || !registerProcPtr)
|
||||
dmxLog(dmxFatal, "Cannot add device %s\n", dmxLocal->name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue