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.

105 lines
3.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../xf86-input-hyperpen/0001-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 763a61bf5122d176fe9f62693c4a8631570a99aa Mon Sep 17 00:00:00 2001
  17. From: Peter Hutterer <peter.hutterer@who-t.net>
  18. Date: Fri, 17 Jul 2009 14:28:42 +1000
  19. Subject: [PATCH] Cope with XINPUT ABI 7.
  20. ---
  21. src/xf86HyperPen.c | 24 ++++++++++++++++++++++--
  22. 1 files changed, 22 insertions(+), 2 deletions(-)
  23. diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
  24. index bd630a5..3920a04 100644
  25. --- a/src/xf86HyperPen.c
  26. +++ b/src/xf86HyperPen.c
  27. @@ -719,6 +719,9 @@ xf86HypOpenDevice(DeviceIntPtr pHyp)
  28. {
  29. LocalDevicePtr local = (LocalDevicePtr)pHyp->public.devicePrivate;
  30. HyperPenDevicePtr priv = (HyperPenDevicePtr)PRIVATE(pHyp);
  31. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  32. + Atom axis_labels[3] = { 0 };
  33. +#endif
  34. if (xf86HypOpen(local) != Success) {
  35. if (local->fd >= 0) {
  36. @@ -730,6 +733,9 @@ xf86HypOpenDevice(DeviceIntPtr pHyp)
  37. /* Set the real values */
  38. InitValuatorAxisStruct(pHyp,
  39. 0,
  40. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  41. + axis_labels[0],
  42. +#endif
  43. 0, /* min val */
  44. priv->hypXSize, /* max val */
  45. LPI2CPM(priv->hypRes), /* resolution */
  46. @@ -737,6 +743,9 @@ xf86HypOpenDevice(DeviceIntPtr pHyp)
  47. LPI2CPM(priv->hypRes)); /* max_res */
  48. InitValuatorAxisStruct(pHyp,
  49. 1,
  50. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  51. + axis_labels[1],
  52. +#endif
  53. 0, /* min val */
  54. priv->hypYSize, /* max val */
  55. LPI2CPM(priv->hypRes), /* resolution */
  56. @@ -744,6 +753,9 @@ xf86HypOpenDevice(DeviceIntPtr pHyp)
  57. LPI2CPM(priv->hypRes)); /* max_res */
  58. InitValuatorAxisStruct(pHyp,
  59. 2,
  60. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  61. + axis_labels[2],
  62. +#endif
  63. 0, /* min val */
  64. 511, /* max val */
  65. 512, /* resolution */
  66. @@ -765,8 +777,10 @@ xf86HypProc(DeviceIntPtr pHyp, int what)
  67. int loop;
  68. LocalDevicePtr local = (LocalDevicePtr)pHyp->public.devicePrivate;
  69. HyperPenDevicePtr priv = (HyperPenDevicePtr)PRIVATE(pHyp);
  70. -
  71. -
  72. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  73. + Atom btn_labels[4] = { 0 };
  74. + Atom axis_labels[3] = { 0 };
  75. +#endif
  76. switch (what) {
  77. case DEVICE_INIT:
  78. @@ -779,6 +793,9 @@ xf86HypProc(DeviceIntPtr pHyp, int what)
  79. if (InitButtonClassDeviceStruct(pHyp,
  80. nbbuttons,
  81. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  82. + btn_labels,
  83. +#endif
  84. map) == FALSE) {
  85. ErrorF("unable to allocate Button class device\n");
  86. return !Success;
  87. @@ -802,6 +819,9 @@ xf86HypProc(DeviceIntPtr pHyp, int what)
  88. if (InitValuatorClassDeviceStruct(pHyp,
  89. nbaxes,
  90. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  91. + axis_labels,
  92. +#endif
  93. #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
  94. xf86GetMotionEvents,
  95. #endif
  96. --
  97. 1.6.5.3