diff --git a/dix/devices.c b/dix/devices.c index fbc9fec..25b443e 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -933,8 +933,6 @@ CloseDevice(DeviceIntPtr dev) free(dev->deviceGrab.sync.event); free(dev->config_info); /* Allocated in xf86ActivateDevice. */ free(dev->last.scroll); - for (j = 0; j < dev->last.num_touches; j++) - free(dev->last.touches[j].valuators); free(dev->last.touches); dev->config_info = NULL; dixFreeObjectWithPrivates(dev, PRIVATE_DEVICE); diff --git a/dix/getevents.c b/dix/getevents.c index 7454cb4..9e3d53c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1895,32 +1895,23 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, default: return 0; } - if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID)) { - if (!valuator_mask_isset(&mask, 0)) - valuator_mask_set_double(&mask, 0, - valuator_mask_get_double(touchpoint.ti-> - valuators, 0)); - if (!valuator_mask_isset(&mask, 1)) - valuator_mask_set_double(&mask, 1, - valuator_mask_get_double(touchpoint.ti-> - valuators, 1)); - } /* Get our screen event co-ordinates (root_x/root_y/event_x/event_y): * these come from the touchpoint in Absolute mode, or the sprite in * Relative. */ if (t->mode == XIDirectTouch) { - transformAbsolute(dev, &mask); - if (!(flags & TOUCH_CLIENT_ID)) { - for (i = 0; i < valuator_mask_size(&mask); i++) { + for (i = 0; i < 2; i++) { double val; - if (valuator_mask_fetch_double(&mask, i, &val)) - valuator_mask_set_double(touchpoint.ti->valuators, i, val); + touchpoint.ti->last_raw_axes[i] = val; + else + valuator_mask_set_double(&mask, i, + touchpoint.ti->last_raw_axes[i]); } } + transformAbsolute(dev, &mask); clipAbsolute(dev, &mask); } else { diff --git a/dix/touch.c b/dix/touch.c index ad48d8a..331bb20 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -225,7 +225,6 @@ void TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch) { memset(ddxtouch, 0, sizeof(*ddxtouch)); - ddxtouch->valuators = valuator_mask_new(dev->valuator->numAxes); } Bool diff --git a/include/inputstr.h b/include/inputstr.h index 841e805..ccffaa1 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -330,8 +330,7 @@ typedef struct _DDXTouchPointInfo { Bool active; /* whether or not the touch is active */ uint32_t ddx_id; /* touch ID given by the DDX */ Bool emulate_pointer; - - ValuatorMask *valuators; /* last recorded axis values */ + double last_raw_axes[2]; /* last X/Y axis valuator data as posted */ } DDXTouchPointInfoRec; typedef struct _TouchClassRec {