Ticket #4132: 0001-Xi-update-device-state-even-if-no-emulated-events-ar.patch

File 0001-Xi-update-device-state-even-if-no-emulated-events-ar.patch, 963 bytes (added by garnacho, 8 years ago)

Patch to fix wrong state after touch capture

  • Xi/exevents.c

    From e57681a5e6aa0c9a337ec127da4489ee9e5fde9f Mon Sep 17 00:00:00 2001
    From: Carlos Garnacho <carlosg@gnome.org>
    Date: Thu, 29 Nov 2012 12:36:31 +0100
    Subject: [PATCH] Xi: update device state even if no emulated events are sent
    
    A touch sequence emulating pointer events may end up not sending
    pointer events (ie. if handled completely by a passive touch grab),
    but the device state needs to be updated anyway for subsequent
    events to have a correct state.
    ---
     Xi/exevents.c | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/Xi/exevents.c b/Xi/exevents.c
    index 4248b9a..36b80e2 100644
    a b ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) 
    16051605    }
    16061606
    16071607    if (!ti) {
     1608        if (emulate_pointer)
     1609            UpdateDeviceState(dev, &ev->device_event);
    16081610        DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n",
    16091611               dev->name, type, touchid);
    16101612        return;