master-branch.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. diff --git a/README b/README
  2. new file mode 100644
  3. index 0000000..dd37aad
  4. --- /dev/null
  5. +++ b/README
  6. @@ -0,0 +1,20 @@
  7. +xf86-input-mutouch - Microtouch input driver for the Xorg X server
  8. +
  9. +Please submit bugs & patches to the Xorg bugzilla:
  10. +
  11. + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
  12. +
  13. +All questions regarding this software should be directed at the
  14. +Xorg mailing list:
  15. +
  16. + http://lists.freedesktop.org/mailman/listinfo/xorg
  17. +
  18. +The master development code repository can be found at:
  19. +
  20. + git://anongit.freedesktop.org/git/xorg/driver/xf86-input-mutouch
  21. +
  22. + http://cgit.freedesktop.org/xorg/driver/xf86-input-mutouch
  23. +
  24. +For more information on the git code manager, see:
  25. +
  26. + http://wiki.x.org/wiki/GitPage
  27. diff --git a/man/mutouch.man b/man/mutouch.man
  28. index 0b1fe6c..1c1182d 100644
  29. --- a/man/mutouch.man
  30. +++ b/man/mutouch.man
  31. @@ -34,7 +34,7 @@ section only covers configuration details specific to this driver.
  32. .PP
  33. Config details...
  34. .SH "SEE ALSO"
  35. -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
  36. +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
  37. .SH AUTHORS
  38. Authors include...
  39. Patrick Lecoanet
  40. diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
  41. index 82c2a25..de319fc 100644
  42. --- a/src/xf86MuTouch.c
  43. +++ b/src/xf86MuTouch.c
  44. @@ -426,9 +426,9 @@ xf86MuTReadInput(LocalDevicePtr local)
  45. * or we will feed X with quite bogus event positions.
  46. */
  47. if (priv->x_inverted)
  48. - cur_x = priv->max_x - cur_x;
  49. + cur_x = priv->max_x - cur_x + priv->min_x;
  50. if (priv->y_inverted)
  51. - cur_y = priv->max_y - cur_y;
  52. + cur_y = priv->max_y - cur_y + priv->min_y;
  53. xf86PostMotionEvent(local_to_use->dev, TRUE, 0, 2, cur_x, cur_y);
  54. /*
  55. @@ -749,6 +749,10 @@ xf86MuTControl(DeviceIntPtr dev,
  56. unsigned char req[MuT_PACKET_SIZE];
  57. unsigned char reply[MuT_BUFFER_SIZE];
  58. char *id_string = DEVICE_ID(local->private_flags) == FINGER_ID ? "finger" : "stylus";
  59. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  60. + Atom btn_label;
  61. + Atom axis_labels[2] = { 0, 0 };
  62. +#endif
  63. switch(mode) {
  64. @@ -766,7 +770,11 @@ xf86MuTControl(DeviceIntPtr dev,
  65. /*
  66. * Device reports button press for up to 1 button.
  67. */
  68. - if (InitButtonClassDeviceStruct(dev, 1, map) == FALSE) {
  69. + if (InitButtonClassDeviceStruct(dev, 1,
  70. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  71. + &btn_label,
  72. +#endif
  73. + map) == FALSE) {
  74. ErrorF("Unable to allocate ButtonClassDeviceStruct\n");
  75. return !Success;
  76. }
  77. @@ -779,6 +787,9 @@ xf86MuTControl(DeviceIntPtr dev,
  78. * screen to fit one meter.
  79. */
  80. if (InitValuatorClassDeviceStruct(dev, 2,
  81. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  82. + axis_labels,
  83. +#endif
  84. #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
  85. xf86GetMotionEvents,
  86. #endif
  87. @@ -787,11 +798,19 @@ xf86MuTControl(DeviceIntPtr dev,
  88. return !Success;
  89. }
  90. else {
  91. - InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
  92. + InitValuatorAxisStruct(dev, 0,
  93. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  94. + axis_labels[0],
  95. +#endif
  96. + priv->min_x, priv->max_x,
  97. 9500,
  98. 0 /* min_res */,
  99. 9500 /* max_res */);
  100. - InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
  101. + InitValuatorAxisStruct(dev, 1,
  102. +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
  103. + axis_labels[1],
  104. +#endif
  105. + priv->min_y, priv->max_y,
  106. 10500,
  107. 0 /* min_res */,
  108. 10500 /* max_res */);