diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com> | 2008-02-05 02:45:34 -0200 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-02-07 14:20:52 +1030 |
commit | 9ea880913d5775454311b0257bbaebf773cd4285 (patch) | |
tree | 19abeb887c893895f2db80b1ece2b802aab454e9 | |
parent | 47ecabff271fc1b8dfcc40656934fb70264b7a0e (diff) |
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 <peter@cs.unisa.edu.au>
-rw-r--r-- | src/xf86Fpit.c | 10 |
1 files 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); |