commit 95676d89c7954cc5550ed386b784b470034320cc Author: Peter Hutterer Date: Wed Jan 30 13:30:59 2008 +1030 Set is_core_pointer to 0 by default. Server 1.4 does not do physical core devices. diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index 81d70a1..5b1d060 100644 --- a/src/xf86Fpit.c +++ b/src/xf86Fpit.c @@ -231,7 +231,7 @@ static void xf86FpitReadInput(LocalDevicePtr local) { FpitPrivatePtr priv = (FpitPrivatePtr) local->private; int len, loop; - int is_core_pointer = 1; + int is_core_pointer = 0; int x, y, buttons, prox; DeviceIntPtr device; int conv_x, conv_y; commit 01a4da993a2ecd0f017baef49b6e57b82c05316d Author: Julien Cristau Date: Mon Jan 14 10:50:54 2008 +1030 Don't crash with xserver 1.4 xf86IsCorePointer() is gone. diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index 531b0bd..81d70a1 100644 --- a/src/xf86Fpit.c +++ b/src/xf86Fpit.c @@ -231,7 +231,7 @@ static void xf86FpitReadInput(LocalDevicePtr local) { FpitPrivatePtr priv = (FpitPrivatePtr) local->private; int len, loop; - int is_core_pointer; + int is_core_pointer = 1; int x, y, buttons, prox; DeviceIntPtr device; int conv_x, conv_y; @@ -319,7 +319,9 @@ static void xf86FpitReadInput(LocalDevicePtr local) prox = (priv->fpitData[loop] & PROXIMITY_BIT) ? 0 : 1; buttons = (priv->fpitData[loop] & BUTTON_BITS); device = local->dev; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 is_core_pointer = xf86IsCorePointer(device); +#endif xf86FpitConvert(local, 0, 2, x, y, 0, 0, 0, 0, &conv_x, &conv_y); xf86XInputSetScreen(local, priv->screen_no, conv_x, conv_y); commit 2823f7c3f3784a1a398b8d5a9157c2e5263b6285 Author: Peter Hutterer Date: Tue Apr 8 16:00:36 2008 +0930 Revert "Don't call xf86IsCorePointer." This reverts commit 9ea880913d5775454311b0257bbaebf773cd4285. diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index 0378e37..531b0bd 100644 --- a/src/xf86Fpit.c +++ b/src/xf86Fpit.c @@ -231,6 +231,7 @@ 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; @@ -318,18 +319,15 @@ 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 GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 - if (xf86IsCorePointer(device) == 0) -#endif - xf86PostProximityEvent(device, prox, 0, 2, x, y); - } + if (prox!=priv->fpitOldProximity) /* proximity changed */ + if (!is_core_pointer) xf86PostProximityEvent(device, prox, 0, 2, x, y); if (priv->fpitOldX != x || priv->fpitOldY != y) /* position changed */ xf86PostMotionEvent(device, 1, 0, 2, x, y);