diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/multitouch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multitouch.c b/src/multitouch.c index 0ef808e..cf06f97 100644 --- a/src/multitouch.c +++ b/src/multitouch.c | |||
| @@ -47,7 +47,7 @@ static int pointer_property(DeviceIntPtr dev, | |||
| 47 | static int device_init(DeviceIntPtr dev, LocalDevicePtr local) | 47 | static int device_init(DeviceIntPtr dev, LocalDevicePtr local) |
| 48 | { | 48 | { |
| 49 | struct MTouch *mt = local->private; | 49 | struct MTouch *mt = local->private; |
| 50 | unsigned char btmap[DIM_BUTTON]={0,1,2}; | 50 | unsigned char btmap[DIM_BUTTON + 1]={0,1,2,3}; |
| 51 | 51 | ||
| 52 | local->fd = xf86OpenSerial(local->options); | 52 | local->fd = xf86OpenSerial(local->options); |
| 53 | if (local->fd < 0) { | 53 | if (local->fd < 0) { |
| @@ -148,7 +148,7 @@ static void handle_state(LocalDevicePtr local, | |||
| 148 | for (i = 0; i < DIM_BUTTON; i++) { | 148 | for (i = 0; i < DIM_BUTTON; i++) { |
| 149 | if (GETBIT(ns->button, i) != GETBIT(os->button, i)) { | 149 | if (GETBIT(ns->button, i) != GETBIT(os->button, i)) { |
| 150 | xf86PostButtonEvent(local->dev, FALSE, | 150 | xf86PostButtonEvent(local->dev, FALSE, |
| 151 | i, GETBIT(ns->button, i), | 151 | i + 1, GETBIT(ns->button, i), |
| 152 | 0, 0); | 152 | 0, 0); |
| 153 | //xf86Msg(X_INFO, "button: %d -> %d\n", | 153 | //xf86Msg(X_INFO, "button: %d -> %d\n", |
| 154 | //i, GETBIT(ns->button, i)); | 154 | //i, GETBIT(ns->button, i)); |
