diff options
Diffstat (limited to 'xorg-server/dix/touch.c')
-rw-r--r-- | xorg-server/dix/touch.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c index a01f152cd..497ad7dac 100644 --- a/xorg-server/dix/touch.c +++ b/xorg-server/dix/touch.c @@ -160,11 +160,13 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id) int i; TouchClassPtr t = dev->touch; DDXTouchPointInfoPtr ti = NULL; - Bool emulate_pointer = (t->mode == XIDirectTouch); + Bool emulate_pointer; if (!t) return NULL; + emulate_pointer = (t->mode == XIDirectTouch); + /* Look for another active touchpoint with the same DDX ID. DDX * touchpoints must be unique. */ if (TouchFindByDDXID(dev, ddx_id, FALSE)) @@ -461,14 +463,17 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev) void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource) { - InternalEvent *tel = InitEventList(GetMaximumEventsNum()); - ValuatorMask *mask = valuator_mask_new(0); + InternalEvent *tel; + ValuatorMask *mask; int i, nev; int flags; if (!ti->history) return; + tel = InitEventList(GetMaximumEventsNum()); + mask = valuator_mask_new(0); + valuator_mask_set_double(mask, 0, ti->history[0].valuators.data[0]); valuator_mask_set_double(mask, 1, ti->history[0].valuators.data[1]); |