From 9ea880913d5775454311b0257bbaebf773cd4285 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Tue, 5 Feb 2008 02:45:34 -0200 Subject: Don't call xf86IsCorePointer. Check xinput abi version to know if the function is available, otherwise run code as if it had returned 0, what should match the new API. Signed-off-by: Peter Hutterer --- src/xf86Fpit.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index 531b0bd..0378e37 100644 --- a/src/xf86Fpit.c +++ b/src/xf86Fpit.c @@ -231,7 +231,6 @@ static void xf86FpitReadInput(LocalDevicePtr local) { FpitPrivatePtr priv = (FpitPrivatePtr) local->private; int len, loop; - int is_core_pointer; int x, y, buttons, prox; DeviceIntPtr device; int conv_x, conv_y; @@ -319,15 +318,18 @@ static void xf86FpitReadInput(LocalDevicePtr local) prox = (priv->fpitData[loop] & PROXIMITY_BIT) ? 0 : 1; buttons = (priv->fpitData[loop] & BUTTON_BITS); device = local->dev; - is_core_pointer = xf86IsCorePointer(device); xf86FpitConvert(local, 0, 2, x, y, 0, 0, 0, 0, &conv_x, &conv_y); xf86XInputSetScreen(local, priv->screen_no, conv_x, conv_y); /* coordinates are ready we can send events */ - if (prox!=priv->fpitOldProximity) /* proximity changed */ - if (!is_core_pointer) xf86PostProximityEvent(device, prox, 0, 2, x, y); + if (prox!=priv->fpitOldProximity) { /* proximity changed */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + if (xf86IsCorePointer(device) == 0) +#endif + xf86PostProximityEvent(device, prox, 0, 2, x, y); + } if (priv->fpitOldX != x || priv->fpitOldY != y) /* position changed */ xf86PostMotionEvent(device, 1, 0, 2, x, y); -- cgit v1.2.3