wok-4.x diff xorg-xf86-input-microtouch/stuff/microtouch.u @ rev 11047
Up: clamtk to 4.36.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Oct 16 22:44:10 2011 +0000 (2011-10-16) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xorg-xf86-input-microtouch/stuff/microtouch.u Sun Oct 16 22:44:10 2011 +0000 1.3 @@ -0,0 +1,63 @@ 1.4 +--- src/microtouch.c 1.5 ++++ src/microtouch.c 1.6 +@@ -404,6 +404,10 @@ 1.7 + MuTPrivatePtr priv = (MuTPrivatePtr) (local->private); 1.8 + unsigned char map[] = 1.9 + {0, 1}; 1.10 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 1.11 ++ Atom btn_label; 1.12 ++ Atom axis_labels[2] = { 0, 0 }; 1.13 ++#endif 1.14 + 1.15 + /* 1.16 + * these have to be here instead of in the SetupProc, because when the 1.17 +@@ -415,7 +419,11 @@ 1.18 + /* 1.19 + * Device reports button press for 1 button. 1.20 + */ 1.21 +- if (InitButtonClassDeviceStruct (dev, 1, map) == FALSE) 1.22 ++ if (InitButtonClassDeviceStruct (dev, 1, 1.23 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 1.24 ++ &btn_label, 1.25 ++#endif 1.26 ++ map) == FALSE) 1.27 + { 1.28 + ErrorF ("Unable to allocate MicroTouch touchscreen ButtonClassDeviceStruct\n"); 1.29 + return !Success; 1.30 +@@ -425,7 +433,13 @@ 1.31 + * Device reports motions on 2 axes in absolute coordinates. 1.32 + * Axes min and max values are reported in raw coordinates. 1.33 + */ 1.34 +- if (InitValuatorClassDeviceStruct (dev, 2, xf86GetMotionEvents, 1.35 ++ if (InitValuatorClassDeviceStruct (dev, 2, 1.36 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 1.37 ++ axis_labels, 1.38 ++#endif 1.39 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 1.40 ++ xf86GetMotionEvents, 1.41 ++#endif 1.42 + local->history_size, Absolute) == FALSE) 1.43 + { 1.44 + ErrorF ("Unable to allocate MicroTouch touchscreen ValuatorClassDeviceStruct\n"); 1.45 +@@ -433,11 +447,19 @@ 1.46 + } 1.47 + else 1.48 + { 1.49 +- InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x, 1.50 ++ InitValuatorAxisStruct (dev, 0, 1.51 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 1.52 ++ axis_labels[0], 1.53 ++#endif 1.54 ++ priv->min_x, priv->max_x, 1.55 + 9500, 1.56 + 0 /* min_res */ , 1.57 + 9500 /* max_res */ ); 1.58 +- InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y, 1.59 ++ InitValuatorAxisStruct (dev, 1, 1.60 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 1.61 ++ axis_labels[1], 1.62 ++#endif 1.63 ++ priv->min_y, priv->max_y, 1.64 + 10500, 1.65 + 0 /* min_res */ , 1.66 + 10500 /* max_res */ );