[PATCH 3/3] Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
Keith Packard
keithp at keithp.com
Tue May 31 16:29:50 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 | 6 ++----
src/evdev.h | 12 ++++++++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/emuMB.c b/src/emuMB.c
index e6aced5..d1777aa 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -268,8 +268,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
}
-void EvdevMBEmuWakeupHandler(void *data,
- int i)
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr)data;
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
@@ -283,8 +282,7 @@ void EvdevMBEmuWakeupHandler(void *data,
}
}
-void EvdevMBEmuBlockHandler(void* data,
- void *waitTime)
+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 8d3c4cd..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(void *, int);
-void EvdevMBEmuBlockHandler(void *, void *);
+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