wok-current annotate xorg-xf86-input-evtouch/stuff/evtouch.u @ rev 12036

Fix stella again, thanks godane
author Antoine Bodin <gokhlayeh@slitaz.org>
date Wed Mar 07 05:49:39 2012 +0100 (2012-03-07)
parents
children
rev   line source
pascal@6641 1 Remove unused variables and code just to make gcc happy
pascal@6641 2
pascal@6641 3 Index: xserver-xorg-input-evtouch/evtouch.c
pascal@6641 4 ===================================================================
pascal@6641 5 --- xserver-xorg-input-evtouch.orig/evtouch.c 2009-01-21 20:06:50.647249439 +0900
pascal@6641 6 +++ xserver-xorg-input-evtouch/evtouch.c 2009-01-21 20:07:39.518253785 +0900
pascal@6641 7 @@ -352,7 +352,6 @@ void EVTouchProcessAbs(EVTouchPrivatePtr
pascal@6641 8 void EVTouchProcessRel(EVTouchPrivatePtr priv)
pascal@6641 9 {
pascal@6641 10 struct input_event *ev; /* packet being/just read */
pascal@6641 11 - int dummy;
pascal@6641 12
pascal@6641 13 ev = &priv->ev;
pascal@6641 14 if ( ev->code == REL_X ) {
pascal@6641 15 @@ -745,17 +744,6 @@ EVTouchNewPacket (EVTouchPrivatePtr priv
pascal@6641 16
pascal@6641 17
pascal@6641 18
pascal@6641 19 -static unsigned char
pascal@6641 20 -EVTouchRead(EVTouchPrivatePtr priv)
pascal@6641 21 -{
pascal@6641 22 - unsigned char c;
pascal@6641 23 - XisbBlockDuration (priv->buffer, EV_TIMEOUT);
pascal@6641 24 - c = XisbRead(priv->buffer);
pascal@6641 25 - return (c);
pascal@6641 26 -}
pascal@6641 27 -
pascal@6641 28 -
pascal@6641 29 -
pascal@6641 30 static Bool
pascal@6641 31 EVTouchGetPacket (EVTouchPrivatePtr priv)
pascal@6641 32 {
pascal@6641 33 From: Thomas Jaeger <ThJaeger@gmail.com>
pascal@6641 34 Date: Sun, 22 Mar 2009 20:58:58 -0400
pascal@6641 35 Subject: Make calibration work on xserver-1.6
pascal@6641 36
pascal@6641 37 Stolen from Ubuntu.
pascal@6641 38
pascal@6641 39 Index: xserver-xorg-input-evtouch/ev_calibrate.c
pascal@6641 40 ===================================================================
pascal@6641 41 --- xserver-xorg-input-evtouch.orig/ev_calibrate.c
pascal@6641 42 +++ xserver-xorg-input-evtouch/ev_calibrate.c
pascal@6641 43 @@ -218,7 +218,7 @@
pascal@6641 44 int cap_style = CapButt; /* style of the line's edje and */
pascal@6641 45 int join_style = JoinBevel; /* joined lines. */
pascal@6641 46
pascal@6641 47 - int event_mask = ExposureMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
pascal@6641 48 + int event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
pascal@6641 49
pascal@6641 50 int depth;
pascal@6641 51 int screen_num;
pascal@6641 52 Index: xserver-xorg-input-evtouch/evtouch.c
pascal@6641 53 ===================================================================
pascal@6641 54 --- xserver-xorg-input-evtouch.orig/evtouch.c
pascal@6641 55 +++ xserver-xorg-input-evtouch/evtouch.c
pascal@6641 56 @@ -306,7 +306,7 @@
pascal@6641 57 }
pascal@6641 58
pascal@6641 59 if (pos_changed == 1) {
pascal@6641 60 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
pascal@6641 61 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
pascal@6641 62 ConvertProc(priv->local, 0, 2,
pascal@6641 63 priv->raw_x, priv->raw_y,
pascal@6641 64 0, 0, 0, 0,
pascal@6641 65 @@ -369,7 +369,7 @@
pascal@6641 66 priv->raw_y = priv->min_y;
pascal@6641 67 }
pascal@6641 68
pascal@6641 69 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
pascal@6641 70 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
pascal@6641 71 ConvertProc(priv->local, 0, 2,
pascal@6641 72 priv->raw_x, priv->raw_y,
pascal@6641 73 0, 0, 0, 0,
pascal@6641 74 Index: xserver-xorg-input-evtouch/evtouch.c
pascal@6641 75 ===================================================================
pascal@6641 76 --- xserver-xorg-input-evtouch.orig/evtouch.c
pascal@6641 77 +++ xserver-xorg-input-evtouch/evtouch.c
pascal@6641 78 @@ -30,10 +30,8 @@
pascal@6641 79
pascal@6641 80 #define _evdev_touch_C_
pascal@6641 81
pascal@6641 82 -#include <xf86Version.h>
pascal@6641 83 -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0)
pascal@6641 84 +#include <xorgVersion.h>
pascal@6641 85 #define XFREE86_V4
pascal@6641 86 -#endif
pascal@6641 87
pascal@6641 88 /*****************************************************************************
pascal@6641 89 * Standard Headers
pascal@6641 90 @@ -74,7 +72,6 @@
pascal@6641 91 #include "xf86_OSproc.h"
pascal@6641 92 #include "xf86Xinput.h"
pascal@6641 93 #include "exevents.h"
pascal@6641 94 -#include "xf86OSmouse.h"
pascal@6641 95 #include "randrstr.h"
pascal@6641 96
pascal@6641 97 #ifndef NEED_XF86_TYPES
pascal@6641 98 @@ -139,7 +136,7 @@
pascal@6641 99 "Kenan Esau",
pascal@6641 100 MODINFOSTRING1,
pascal@6641 101 MODINFOSTRING2,
pascal@6641 102 - XF86_VERSION_CURRENT,
pascal@6641 103 + XORG_VERSION_CURRENT,
pascal@6641 104 0, 8, 8,
pascal@6641 105 ABI_CLASS_XINPUT,
pascal@6641 106 ABI_XINPUT_VERSION,
pascal@6641 107 @@ -590,6 +587,10 @@
pascal@6641 108 EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
pascal@6641 109 unsigned char map[EV_MAX_BUTTONS];
pascal@6641 110 int i;
pascal@6641 111 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6641 112 + Atom btn_label;
pascal@6641 113 + Atom axis_labels[2] = { 0, 0 };
pascal@6641 114 +#endif
pascal@6641 115
pascal@6641 116 for (i = 0; i < EV_MAX_BUTTONS; i++)
pascal@6641 117 map[i] = i;
pascal@6641 118 @@ -628,7 +629,11 @@
pascal@6641 119 /*
pascal@6641 120 * Device reports button press for 5 buttons.
pascal@6641 121 */
pascal@6641 122 - if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE)
pascal@6641 123 + if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS,
pascal@6641 124 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6641 125 + &btn_label,
pascal@6641 126 +#endif
pascal@6641 127 + map) == FALSE)
pascal@6641 128 {
pascal@6641 129 ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n");
pascal@6641 130 return BadAlloc;
pascal@6641 131 @@ -652,26 +657,43 @@
pascal@6641 132 * Device reports motions on 2 axes in absolute coordinates.
pascal@6641 133 * Axes min and max values are reported in raw coordinates.
pascal@6641 134 */
pascal@6641 135 - if (InitValuatorClassDeviceStruct(dev, 2, xf86GetMotionEvents,
pascal@6641 136 + if (InitValuatorClassDeviceStruct(dev, 2,
pascal@6641 137 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6641 138 + axis_labels,
pascal@6641 139 +#endif
pascal@6641 140 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
pascal@6641 141 + xf86GetMotionEvents,
pascal@6641 142 +#endif
pascal@6641 143 local->history_size, Absolute) == FALSE)
pascal@6641 144 {
pascal@6641 145 ErrorF ("Unable to allocate EVTouch touchscreen ValuatorClassDeviceStruct\n");
pascal@6641 146 return !Success;
pascal@6641 147 }
pascal@6641 148
pascal@6641 149 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
pascal@6641 150 - xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width,
pascal@6641 151 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
pascal@6641 152 + xf86InitValuatorAxisStruct(dev, 0,
pascal@6641 153 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6641 154 + axis_labels[0],
pascal@6641 155 +#endif
pascal@6641 156 + 0, priv->screen_width,
pascal@6641 157 1024,
pascal@6641 158 EV_AXIS_MIN_RES /* min_res */ ,
pascal@6641 159 EV_AXIS_MAX_RES /* max_res */ );
pascal@6641 160 xf86InitValuatorDefaults(dev, 0);
pascal@6641 161 - xf86InitValuatorAxisStruct(dev, 1, 0, priv->screen_height,
pascal@6641 162 + xf86InitValuatorAxisStruct(dev, 1,
pascal@6641 163 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
pascal@6641 164 + axis_labels[1],
pascal@6641 165 +#endif
pascal@6641 166 + 0, priv->screen_height,
pascal@6641 167 1024,
pascal@6641 168 EV_AXIS_MIN_RES /* min_res */ ,
pascal@6641 169 EV_AXIS_MAX_RES /* max_res */ );
pascal@6641 170 xf86InitValuatorDefaults(dev, 1);
pascal@6641 171 #else
pascal@6641 172 xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
pascal@6641 173 + 1024,
pascal@6641 174 + EV_AXIS_MIN_RES /* min_res */ ,
pascal@6641 175 + EV_AXIS_MAX_RES /* max_res */ );
pascal@6641 176 xf86InitValuatorDefaults(dev, 1);
pascal@6641 177 #endif
pascal@6641 178