OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../xf86-input-mutouch/0002-Cope-with-XINPUT-ABI-7.patch
  5. # Copyright (C) 2010 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 01997d42cf7e73700b798340267855850bdc5352 Mon Sep 17 00:00:00 2001
  17. From: Peter Hutterer <peter.hutterer@who-t.net>
  18. Date: Fri, 17 Jul 2009 14:18:51 +1000
  19. Subject: [PATCH 2/2] Cope with XINPUT ABI 7.
  20. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  21. ---
  22. src/xf86MuTouch.c | 25 ++++++++++++++++++++++---
  23. 1 files changed, 22 insertions(+), 3 deletions(-)
  24. diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
  25. index 2d5cdb0..de319fc 100644
  26. --- a/src/xf86MuTouch.c
  27. +++ b/src/xf86MuTouch.c
  28. @@ -749,6 +749,10 @@ xf86MuTControl(DeviceIntPtr dev,
  29. unsigned char req[MuT_PACKET_SIZE];
  30. unsigned char reply[MuT_BUFFER_SIZE];
  31. char *id_string = DEVICE_ID(local->private_flags) == FINGER_ID ? "finger" : "stylus";
  32. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  33. + Atom btn_label;
  34. + Atom axis_labels[2] = { 0, 0 };
  35. +#endif
  36. switch(mode) {
  37. @@ -766,7 +770,11 @@ xf86MuTControl(DeviceIntPtr dev,
  38. /*
  39. * Device reports button press for up to 1 button.
  40. */
  41. - if (InitButtonClassDeviceStruct(dev, 1, map) == FALSE) {
  42. + if (InitButtonClassDeviceStruct(dev, 1,
  43. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  44. + &btn_label,
  45. +#endif
  46. + map) == FALSE) {
  47. ErrorF("Unable to allocate ButtonClassDeviceStruct\n");
  48. return !Success;
  49. }
  50. @@ -779,6 +787,9 @@ xf86MuTControl(DeviceIntPtr dev,
  51. * screen to fit one meter.
  52. */
  53. if (InitValuatorClassDeviceStruct(dev, 2,
  54. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  55. + axis_labels,
  56. +#endif
  57. #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
  58. xf86GetMotionEvents,
  59. #endif
  60. @@ -787,11 +798,19 @@ xf86MuTControl(DeviceIntPtr dev,
  61. return !Success;
  62. }
  63. else {
  64. - InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
  65. + InitValuatorAxisStruct(dev, 0,
  66. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  67. + axis_labels[0],
  68. +#endif
  69. + priv->min_x, priv->max_x,
  70. 9500,
  71. 0 /* min_res */,
  72. 9500 /* max_res */);
  73. - InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
  74. + InitValuatorAxisStruct(dev, 1,
  75. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  76. + axis_labels[1],
  77. +#endif
  78. + priv->min_y, priv->max_y,
  79. 10500,
  80. 0 /* min_res */,
  81. 10500 /* max_res */);
  82. --
  83. 1.6.5.3