[PATCH xf86-input-evdev 3/3] Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
Keith Packard
keithp at keithp.com
Wed Jun 1 00:52:43 UTC 2016
The evdev driver wasn't using the select mask arguments, so this
change just involves adjusting the argument lists.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
src/emuMB.c | 8 ++------
src/evdev.h | 12 ++++++++++--
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/emuMB.c b/src/emuMB.c
index 94e50c4..d1777aa 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -268,9 +268,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
}
-void EvdevMBEmuWakeupHandler(pointer data,
- int i,
- pointer LastSelectMask)
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr)data;
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
@@ -284,9 +282,7 @@ void EvdevMBEmuWakeupHandler(pointer data,
}
}
-void EvdevMBEmuBlockHandler(pointer data,
- struct timeval **waitTime,
- pointer LastSelectMask)
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr) data;
EvdevPtr pEvdev= (EvdevPtr) pInfo->private;
diff --git a/src/evdev.h b/src/evdev.h
index 0ebcfa0..c506296 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -71,6 +71,14 @@
#define HAVE_THREADED_INPUT 1
#endif
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 24
+#define BLOCK_HANDLER_ARGS void *data, void *waitTime
+#define WAKEUP_HANDLER_ARGS void *data, int i
+#else
+#define BLOCK_HANDLER_ARGS pointer data, struct timeval **waitTime, pointer LastSelectMask
+#define WAKEUP_HANDLER_ARGS void *data, int i, pointer LastSelectMask
+#endif
+
#define EVDEV_MAXBUTTONS 32
#define EVDEV_MAXQUEUE 32
@@ -264,8 +272,8 @@ unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);
/* Middle Button emulation */
int EvdevMBEmuTimer(InputInfoPtr);
BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
-void EvdevMBEmuWakeupHandler(pointer, int, pointer);
-void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer);
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS);
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS);
void EvdevMBEmuPreInit(InputInfoPtr);
void EvdevMBEmuOn(InputInfoPtr);
void EvdevMBEmuFinalize(InputInfoPtr);
--
2.8.1
More information about the xorg-devel
mailing list