# HG changeset patch # User Pascal Bellard # Date 1286744500 -7200 # Node ID abe49bb6afffb7cb1f5af6754bb49f3ef7e7797e # Parent 8ea11f6c1d7ca1813e8195af6c1138ce0027352a xorg-xf86-input-microtouch: update for new xorg diff -r 8ea11f6c1d7c -r abe49bb6afff xorg-xf86-input-microtouch/receipt --- a/xorg-xf86-input-microtouch/receipt Sun Oct 10 22:25:46 2010 +0200 +++ b/xorg-xf86-input-microtouch/receipt Sun Oct 10 23:01:40 2010 +0200 @@ -17,6 +17,7 @@ compile_rules() { cd $src + grep -qs axis_labels src/microtouch.c || patch -p0 < ../stuff/microtouch.u ./configure \ --prefix=/usr \ --sysconfdir=/etc \ diff -r 8ea11f6c1d7c -r abe49bb6afff xorg-xf86-input-microtouch/stuff/microtouch.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xorg-xf86-input-microtouch/stuff/microtouch.u Sun Oct 10 23:01:40 2010 +0200 @@ -0,0 +1,63 @@ +--- src/microtouch.c ++++ src/microtouch.c +@@ -404,6 +404,10 @@ + MuTPrivatePtr priv = (MuTPrivatePtr) (local->private); + unsigned char map[] = + {0, 1}; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ Atom btn_label; ++ Atom axis_labels[2] = { 0, 0 }; ++#endif + + /* + * these have to be here instead of in the SetupProc, because when the +@@ -415,7 +419,11 @@ + /* + * Device reports button press for 1 button. + */ +- if (InitButtonClassDeviceStruct (dev, 1, map) == FALSE) ++ if (InitButtonClassDeviceStruct (dev, 1, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ &btn_label, ++#endif ++ map) == FALSE) + { + ErrorF ("Unable to allocate MicroTouch touchscreen ButtonClassDeviceStruct\n"); + return !Success; +@@ -425,7 +433,13 @@ + * Device reports motions on 2 axes in absolute coordinates. + * Axes min and max values are reported in raw coordinates. + */ +- if (InitValuatorClassDeviceStruct (dev, 2, xf86GetMotionEvents, ++ if (InitValuatorClassDeviceStruct (dev, 2, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axis_labels, ++#endif ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 ++ xf86GetMotionEvents, ++#endif + local->history_size, Absolute) == FALSE) + { + ErrorF ("Unable to allocate MicroTouch touchscreen ValuatorClassDeviceStruct\n"); +@@ -433,11 +447,19 @@ + } + else + { +- InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x, ++ InitValuatorAxisStruct (dev, 0, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axis_labels[0], ++#endif ++ priv->min_x, priv->max_x, + 9500, + 0 /* min_res */ , + 9500 /* max_res */ ); +- InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y, ++ InitValuatorAxisStruct (dev, 1, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axis_labels[1], ++#endif ++ priv->min_y, priv->max_y, + 10500, + 0 /* min_res */ , + 10500 /* max_res */ );