wok annotate xorg-xf86-input-mutouch/stuff/mutouch-1.2.1-abi.patch @ rev 15720

Up: sshfs-fuse (2.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 26 12:06:03 2013 +0000 (2013-12-26)
parents
children
rev   line source
slaxemulator@6493 1 From db04a5333b545a0442b995bae47d2c5527a7459e Mon Sep 17 00:00:00 2001
slaxemulator@6493 2 From: Peter Hutterer <peter.hutterer@who-t.net>
slaxemulator@6493 3 Date: Fri, 17 Jul 2009 14:18:51 +1000
slaxemulator@6493 4 Subject: [PATCH] Cope with XINPUT ABI 7.
slaxemulator@6493 5
slaxemulator@6493 6 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
slaxemulator@6493 7 ---
slaxemulator@6493 8 src/xf86MuTouch.c | 25 ++++++++++++++++++++++---
slaxemulator@6493 9 1 files changed, 22 insertions(+), 3 deletions(-)
slaxemulator@6493 10
slaxemulator@6493 11 diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
slaxemulator@6493 12 index 2d5cdb0..de319fc 100644
slaxemulator@6493 13 --- a/src/xf86MuTouch.c
slaxemulator@6493 14 +++ b/src/xf86MuTouch.c
slaxemulator@6493 15 @@ -749,6 +749,10 @@ xf86MuTControl(DeviceIntPtr dev,
slaxemulator@6493 16 unsigned char req[MuT_PACKET_SIZE];
slaxemulator@6493 17 unsigned char reply[MuT_BUFFER_SIZE];
slaxemulator@6493 18 char *id_string = DEVICE_ID(local->private_flags) == FINGER_ID ? "finger" : "stylus";
slaxemulator@6493 19 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
slaxemulator@6493 20 + Atom btn_label;
slaxemulator@6493 21 + Atom axis_labels[2] = { 0, 0 };
slaxemulator@6493 22 +#endif
slaxemulator@6493 23
slaxemulator@6493 24 switch(mode) {
slaxemulator@6493 25
slaxemulator@6493 26 @@ -766,7 +770,11 @@ xf86MuTControl(DeviceIntPtr dev,
slaxemulator@6493 27 /*
slaxemulator@6493 28 * Device reports button press for up to 1 button.
slaxemulator@6493 29 */
slaxemulator@6493 30 - if (InitButtonClassDeviceStruct(dev, 1, map) == FALSE) {
slaxemulator@6493 31 + if (InitButtonClassDeviceStruct(dev, 1,
slaxemulator@6493 32 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
slaxemulator@6493 33 + &btn_label,
slaxemulator@6493 34 +#endif
slaxemulator@6493 35 + map) == FALSE) {
slaxemulator@6493 36 ErrorF("Unable to allocate ButtonClassDeviceStruct\n");
slaxemulator@6493 37 return !Success;
slaxemulator@6493 38 }
slaxemulator@6493 39 @@ -779,6 +787,9 @@ xf86MuTControl(DeviceIntPtr dev,
slaxemulator@6493 40 * screen to fit one meter.
slaxemulator@6493 41 */
slaxemulator@6493 42 if (InitValuatorClassDeviceStruct(dev, 2,
slaxemulator@6493 43 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
slaxemulator@6493 44 + axis_labels,
slaxemulator@6493 45 +#endif
slaxemulator@6493 46 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
slaxemulator@6493 47 xf86GetMotionEvents,
slaxemulator@6493 48 #endif
slaxemulator@6493 49 @@ -787,11 +798,19 @@ xf86MuTControl(DeviceIntPtr dev,
slaxemulator@6493 50 return !Success;
slaxemulator@6493 51 }
slaxemulator@6493 52 else {
slaxemulator@6493 53 - InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
slaxemulator@6493 54 + InitValuatorAxisStruct(dev, 0,
slaxemulator@6493 55 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
slaxemulator@6493 56 + axis_labels[0],
slaxemulator@6493 57 +#endif
slaxemulator@6493 58 + priv->min_x, priv->max_x,
slaxemulator@6493 59 9500,
slaxemulator@6493 60 0 /* min_res */,
slaxemulator@6493 61 9500 /* max_res */);
slaxemulator@6493 62 - InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
slaxemulator@6493 63 + InitValuatorAxisStruct(dev, 1,
slaxemulator@6493 64 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
slaxemulator@6493 65 + axis_labels[1],
slaxemulator@6493 66 +#endif
slaxemulator@6493 67 + priv->min_y, priv->max_y,
slaxemulator@6493 68 10500,
slaxemulator@6493 69 0 /* min_res */,
slaxemulator@6493 70 10500 /* max_res */);
slaxemulator@6493 71 --
slaxemulator@6493 72 1.6.3.rc1.2.g0164.dirty
slaxemulator@6493 73