summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-29Don't end a pointer emulated touch when there are no touch listenersmultitouch-develChase Douglas1-1/+2
PE touches need to be ended later on in the event processing stack. This commit will leave these touches hanging for now. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-29Update UpdateDeviceState for pointer emulated touch eventsChase Douglas3-29/+75
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-29Keep internal event type on touch end even for pending endsChase Douglas2-11/+16
Move the type change to the wire conversion. This will help keep things sane for pointer emulation. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add touch pointer emulation sprite motion, screen crossing fixesChase Douglas1-0/+65
Shamelessly copied bits from fill_pointer_events() and positionSprite(). Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Update DeliverGrabbedEvent for touch pointer emulationChase Douglas1-0/+137
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Update CheckMotion for touch eventsChase Douglas1-0/+3
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Reorder internal touch event typesChase Douglas1-1/+1
This allows for checking the range of types between ET_TouchBegin and ET_TouchEnd. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add AllowPointerEmulatedTouch()Chase Douglas1-0/+23
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add window member to touch listener recordChase Douglas2-8/+11
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add RemoveTouchEventsFromQueue()Chase Douglas2-0/+77
Pointer emulated touch events are enqueued to syncEvents while a grab is active on the device. If a touch grab is accepted, the client has already seen all the touches, and the touch events must be removed from the queue. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Change pendtail to be only a single pointer to the last event in queueChase Douglas2-13/+19
I could not wrap my head around what pendtail was attempting to do without serious effort and pen and paper. All it needs to be is a simple pointer to the last event in the queue, or NULL if there are no events. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Set emulate_pointer member of dix touch info recordChase Douglas1-2/+4
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Match touch grab only if it is the current owner of the touchChase Douglas1-3/+19
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Export TouchResourceIsOwner() internallyChase Douglas2-1/+2
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Send pointer emulated touch events to grabbing, ownership clientsChase Douglas2-3/+117
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Only call TouchListenerGone from FreeGrab is resource is validChase Douglas1-1/+2
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Only send pointer emulated motion events for touch begin onceChase Douglas2-0/+13
The initial motion event occurs before a potential passive grab activation, and thus should never be sent twice. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Update passive grab check routines for pointer emulationChase Douglas1-23/+155
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Split ActivatePassiveGrab() from CheckPassiveGrab()Chase Douglas1-86/+111
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Move grab check and activation logic to CheckPassiveGrab()Chase Douglas1-180/+201
This is needed for future pointer emulation work. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28DeliverDeviceEvents: Deliver pointer emulated eventsChase Douglas1-0/+105
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28EventIsDeliverable: Check pointer emulated events for touch eventsChase Douglas2-0/+10
Pointer emulated results are shifted so they can be discerned from touch event results. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add IsTouchEvent() helper functionChase Douglas2-0/+16
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add GetPointerEmulated{Internal,Core,XI,XI2}Type() helper functionsChase Douglas2-0/+63
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28ProcessDeviceEvent: Handle touch events like pointer eventsChase Douglas1-3/+19
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Deliver pointer emulated touch events through normal processChase Douglas1-8/+21
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Push button mapping down to event deliveryChase Douglas4-22/+42
Touch IDs are sent in the detail field as well, which causes a clash in pointer grabbing of emulated touch events. Pushing button mapping to event delivery time will help work around this issue. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Reorder DeliverTouchEvents below ProcessDeviceEventChase Douglas1-38/+38
So we can call ProcessDeviceEvent from DeliverTouchEvents without forward declaring it. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-28Add TouchToMotion() and TouchToButton()Chase Douglas2-0/+130
These functions generate wire protocol input events from internal touch events for pointer emulation. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-23Set TOUCH_POINTER_EMULATED flag on pointer emulating touch eventsChase Douglas2-0/+4
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-16Update comment for XI 2.2 multitouch supportChase Douglas1-1/+1
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-16Set touch pointer emulation in DDX touch recordChase Douglas1-16/+27
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-11test: add very basic touch valuator class initialisation testPeter Hutterer1-0/+26
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11dix: fail TouchClass initialisation if we don't have a valuator classPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11dix: don't generate raw events for DIX-generated eventsPeter Hutterer1-6/+13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: mark a rejected TouchEnd, so we know where to filter itPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: don't send the TouchOwnership event to non-ownersPeter Hutterer1-2/+9
Rather than restructuring the code to figure out who to send it to, simply filter out those that shouldn't get it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: send the ownership event after the TouchBegin where requiredPeter Hutterer1-0/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: a ownership event with no reason should simply be passed onPeter Hutterer1-3/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11dix: XITouchOwnership events contain event and child windowPeter Hutterer1-1/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: don't deliver TouchBegin to non-owning grabPeter Hutterer1-1/+15
A grab that doesn't select for ownership events and is not the top-most grab should not get the TouchBegin event just yet - it still counts as a grab however. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11dix: complain about missing x/y valuators from the DIXPeter Hutterer1-2/+5
Current implementation requires DIX events to submit x/y valuator information. Complain if it's missing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Add a fixmePeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: Send the ownership event after TouchBegin where requiredPeter Hutterer1-2/+19
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: replay the touch history for non-ownership clientsPeter Hutterer4-15/+41
When a non-owner touch client gets an emulated TouchBegin event, also send it all TouchUpdate events that we have in the history for this touch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: keep a touch event history aroundPeter Hutterer4-0/+91
DOES NOT YET COVER NON-OWNER GRABS Clients without ownership handling will need a begin + a series of update events once they become owners. Store a set of events in the touchpoint so we can replay on-demand. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11include: fix up some flagsPeter Hutterer1-2/+2
2011-11-11Xi: update valuator information and re-use for TouchEnd eventPeter Hutterer1-11/+32
Store whatever the latest valuator information is and reuse for the emulated TouchEnd events. Emulated TouchBegin events still have the wrong information. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: handle TouchBegin semantics for non-ownership clientsPeter Hutterer1-14/+21
TouchBegin events must not be sent to clients that don't want TouchOwnership unless they are the immediate owner. They must still be added to the listeners array though. If they are the current owner already do not send the TouchBegin event again, otherwise the client gets added twice. This patch only covers regular clients, not grabbing clients that don't select for TouchOwnership. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11Xi: if the next owner needs a TouchBegin, fake one upPeter Hutterer1-13/+20
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>