wok-4.x rev 6642
xorg-xf86-input-microtouch: update for new xorg
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 10 23:01:40 2010 +0200 (2010-10-10) |
parents | 8ea11f6c1d7c |
children | e4647b7a54e0 |
files | xorg-xf86-input-microtouch/receipt xorg-xf86-input-microtouch/stuff/microtouch.u |
line diff
1.1 --- a/xorg-xf86-input-microtouch/receipt Sun Oct 10 22:25:46 2010 +0200 1.2 +++ b/xorg-xf86-input-microtouch/receipt Sun Oct 10 23:01:40 2010 +0200 1.3 @@ -17,6 +17,7 @@ 1.4 compile_rules() 1.5 { 1.6 cd $src 1.7 + grep -qs axis_labels src/microtouch.c || patch -p0 < ../stuff/microtouch.u 1.8 ./configure \ 1.9 --prefix=/usr \ 1.10 --sysconfdir=/etc \
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/xorg-xf86-input-microtouch/stuff/microtouch.u Sun Oct 10 23:01:40 2010 +0200 2.3 @@ -0,0 +1,63 @@ 2.4 +--- src/microtouch.c 2.5 ++++ src/microtouch.c 2.6 +@@ -404,6 +404,10 @@ 2.7 + MuTPrivatePtr priv = (MuTPrivatePtr) (local->private); 2.8 + unsigned char map[] = 2.9 + {0, 1}; 2.10 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 2.11 ++ Atom btn_label; 2.12 ++ Atom axis_labels[2] = { 0, 0 }; 2.13 ++#endif 2.14 + 2.15 + /* 2.16 + * these have to be here instead of in the SetupProc, because when the 2.17 +@@ -415,7 +419,11 @@ 2.18 + /* 2.19 + * Device reports button press for 1 button. 2.20 + */ 2.21 +- if (InitButtonClassDeviceStruct (dev, 1, map) == FALSE) 2.22 ++ if (InitButtonClassDeviceStruct (dev, 1, 2.23 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 2.24 ++ &btn_label, 2.25 ++#endif 2.26 ++ map) == FALSE) 2.27 + { 2.28 + ErrorF ("Unable to allocate MicroTouch touchscreen ButtonClassDeviceStruct\n"); 2.29 + return !Success; 2.30 +@@ -425,7 +433,13 @@ 2.31 + * Device reports motions on 2 axes in absolute coordinates. 2.32 + * Axes min and max values are reported in raw coordinates. 2.33 + */ 2.34 +- if (InitValuatorClassDeviceStruct (dev, 2, xf86GetMotionEvents, 2.35 ++ if (InitValuatorClassDeviceStruct (dev, 2, 2.36 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 2.37 ++ axis_labels, 2.38 ++#endif 2.39 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 2.40 ++ xf86GetMotionEvents, 2.41 ++#endif 2.42 + local->history_size, Absolute) == FALSE) 2.43 + { 2.44 + ErrorF ("Unable to allocate MicroTouch touchscreen ValuatorClassDeviceStruct\n"); 2.45 +@@ -433,11 +447,19 @@ 2.46 + } 2.47 + else 2.48 + { 2.49 +- InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x, 2.50 ++ InitValuatorAxisStruct (dev, 0, 2.51 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 2.52 ++ axis_labels[0], 2.53 ++#endif 2.54 ++ priv->min_x, priv->max_x, 2.55 + 9500, 2.56 + 0 /* min_res */ , 2.57 + 9500 /* max_res */ ); 2.58 +- InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y, 2.59 ++ InitValuatorAxisStruct (dev, 1, 2.60 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 2.61 ++ axis_labels[1], 2.62 ++#endif 2.63 ++ priv->min_y, priv->max_y, 2.64 + 10500, 2.65 + 0 /* min_res */ , 2.66 + 10500 /* max_res */ );