[PATCH xf86-input-mouse 2/2] Support ABI_XINPUT_VERSION 24 (remove LastSelectMask from block/wakeup)
Keith Packard
keithp at keithp.com
Tue May 31 05:45:13 UTC 2016
The block and wakeup handler API is changing so that the FD_SET type
isn't visible outside the OS layer anymore. The mouse driver didn't
need that argument anyways, so the change is just to adjust the APIs
to avoid compiler warnings.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
src/mouse.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/mouse.c b/src/mouse.c
index d5f918e..dae98aa 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -133,6 +133,14 @@ typedef struct _DragLockRec {
#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
+
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags);
#else
@@ -144,9 +152,8 @@ static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
static void MousePostEvent(InputInfoPtr pInfo, int buttons,
int dx, int dy, int dz, int dw);
static void MouseReadInput(InputInfoPtr pInfo);
-static void MouseBlockHandler(pointer data, struct timeval **waitTime,
- pointer LastSelectMask);
-static void MouseWakeupHandler(pointer data, int i, pointer LastSelectMask);
+static void MouseBlockHandler(BLOCK_HANDLER_ARGS);
+static void MouseWakeupHandler(WAKEUP_HANDLER_ARGS);
static void FlushButtons(MouseDevPtr pMse);
static Bool SetupMouse(InputInfoPtr pInfo);
@@ -2112,9 +2119,7 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo)
#endif
}
-static void MouseBlockHandler(pointer data,
- struct timeval **waitTime,
- pointer LastSelectMask)
+static void MouseBlockHandler(BLOCK_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr) data;
MouseDevPtr pMse = (MouseDevPtr) pInfo->private;
@@ -2129,9 +2134,7 @@ static void MouseBlockHandler(pointer data,
}
}
-static void MouseWakeupHandler(pointer data,
- int i,
- pointer LastSelectMask)
+static void MouseWakeupHandler(WAKEUP_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr) data;
MouseDevPtr pMse = (MouseDevPtr) pInfo->private;
--
2.8.1
More information about the xorg-devel
mailing list