diff options
author | Keith Packard <keithp@keithp.com> | 2016-05-30 22:45:13 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-09-06 13:53:31 +1000 |
commit | 2dda9b90b9c632d2f27a7b2f46bc4e4af1e9d82d (patch) | |
tree | 5b61bb4fd26d3b8eb98c4980b4aa3ce8d70280ff | |
parent | 80952e5a5fcb4158249451f2339de618c4e63b82 (diff) |
Support ABI_XINPUT_VERSION 24 (remove LastSelectMask from block/wakeup)
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@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/mouse.c | 21 |
1 files 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; |