summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix tap event leakageChase Douglas2011-03-142-9/+2
| | | | | | | | | | | | As an earlier stabilizing measure, very short taps were not registered as such but discarded, potentially letting the touch information through as non-gesture events. This should rather be handled in utouch-frame, and thus the code his dropped here. [rydberg@euromail.se: folded in unused code removal] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add in time boundaries for recognitionChase Douglas2011-03-142-18/+144
| | | | | | | | | | | | | | | | | | | | | 50 ms: Minimum time waiting for touch configuration to settle before flushing touch events to X. We don't want a two finger gesture triggering X events for the first finger before the second finger lands. 200 ms: Maximum time for touches to begin a gesture. If no gesture is found within this time period, the events are flushed to X. If after 50 ms there are no possible gestures for the number of active touches, the events are immediately flushed to X. If events are flushed to X, no more gesture recognition is possible until all touches are lifted. Likewise, if any gesture is recognized, no events may be flushed to X until all touches are lifted. [rydberg@euromail.se: this patch is severely restrictive and not final] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Remove pointer emulationChase Douglas2011-03-142-157/+15
| | | | | | | | With the assumption that X will be handle to handle the gesture cases correctly, remove the pointer emulation Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Small compilation warning fixesChase Douglas2011-03-142-3/+2
| | | | | | | Found by using -Wall -Werror Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Bump to v1.0.18Henrik Rydberg2011-01-031-1/+1
| | | | | | | | | The grail symbols are intact and abi compatible, whereas the remaining symbols, which should not really be present, have all been removed. Since the remaining symbols represent the actual official API, this is not considered an ABI breakage. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Only export the intended grail symbolsHenrik Rydberg2011-01-023-0/+15
| | | | | | | | In the making of grail1, the intention was never that the gin, gru and touch symbols be exported. Rectify this by adding an explicit symbols file used during linking. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Replace touch logic with utouch frame engineHenrik Rydberg2011-01-0221-688/+259
| | | | | | | | | | | The original grail uses an internal touch framework and exports some touch information as extended attributes to gesture events. This was never quite the intention, but rather to expose gestures and touches on a similar footing, such that grail can be input agnostic. This patch starts off by replacing the internal touch framework with the utouch-frame engine. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Prepare for queued event handlingHenrik Rydberg2011-01-025-12/+79
| | | | | | | | | The current grail operates via callbacks. In order to make grail work as a pipe, where input and output can be controlled externally, add the missing event queue for gestures, and align the code to simplify a switch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Move test program to tools directoryHenrik Rydberg2011-01-028-116/+10
| | | | | | | | | The current test programs are tools rather than automatic tests. To conform better to the the usage of "make check", move the current tools over the appropriate directory. Also drop the grail-touch program, as it will be replaced by the utouch-frame package. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.17v1.0.17Henrik Rydberg2010-11-171-1/+1
|
* Use a unified pointer emulation modelHenrik Rydberg2010-11-172-4/+57
| | | | | | | | | | | | | | | The existing kernel MT devices together use a handful of different pointer emulation strategies, each with its own subtlety. This creates a problem for grail, which needs to rebuild pointer emulation during gesture recognition; relying on the correct pointer information to be available at the right time becomes almost impossible. This patch implements a common pointer emulation model for grail, following a strategy recently discussed on LKML. This resolves the problems stemming from different emulation strategies, and results in a common pointer emulation experience for all devices. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.16v1.0.16Henrik Rydberg2010-11-081-1/+1
|
* Report touch down on one-finger entryHenrik Rydberg2010-10-181-3/+3
| | | | | | | | | | | | | The current code mistakenly set the pointer logic based on the single variable, which is false at the entry to one-finger mode, but true immediately afterwards. This leads to grail sometimes failing to emit the proper emulation sequence, resulting in a missed touch in X. This patch corrects the logic such that the pointer is based directly on one-finger mode, thereby solving the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.15v1.0.15Henrik Rydberg2010-09-281-1/+1
|
* Only support pure absolute devices at this timeHenrik Rydberg2010-09-281-3/+11
| | | | | | | | | There are some hybrid relative/absolute devices out there, like the magic mouse, for which special behavior, outside the current scope of grail, is expected. This patch disables grail for those devices. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.14v1.0.14Henrik Rydberg2010-09-211-1/+1
|
* Show all information for pass-through eventsHenrik Rydberg2010-09-211-1/+3
| | | | | | | In grail-gesture, the timing information is missing. Remedied with this patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add tap state to the tapping modelHenrik Rydberg2010-09-212-1/+3
| | | | | | | Add the ability to read off the tap state in the tapping model. Useful for emulation i lieu of tapping gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add tap emulationHenrik Rydberg2010-09-211-3/+17
| | | | | | | | | | | Touchscreens always emit a button event when touching the screen. Trackpads, however, are considered hovering while touching the pad, and instead uses taps to emits button events, which is traditionally implemented elsewhere, and thus leaves a functionality discrepancy. This patch adds tap emulation to grail, utilizing gesture engine. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Split pointer status and report statusHenrik Rydberg2010-09-212-3/+30
| | | | | | | Separate out reporting of the touch state, such that reporting can be deferred. Does not introduce any logic changes. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not tap when leaving fingers on the padHenrik Rydberg2010-09-212-11/+14
| | | | | | | | The current code will treat a 3-down-2-up as a tap. This patch changes the logic so that taps are only emitted when the number of fingers returns to the baseline. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* bug: Only report position change eventsHenrik Rydberg2010-09-212-2/+9
| | | | | | | This bug was introduced in v1.0.11. Only report events when the pointer position is actually changing. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Reorganize input event emulation codeHenrik Rydberg2010-09-211-34/+23
| | | | | | | | | Inject the emulated events into the event buffer instead, and move the pointer logic into the emulation handler. Introduces no logical changes, but reveals the bug in the position event frequency. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Move input event filter from tail side to head sideHenrik Rydberg2010-09-211-12/+3
| | | | | | | | There is no need to buffer events that will be ignored later on, so move the event filter to the upstream side. This also allows the event buffer to be used for injected events. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Simplify book-keeping of active gesturesHenrik Rydberg2010-09-213-17/+10
| | | | | | | | | The current frame computation returns the event types to filter, which is less useful than knowing what gesture types are active in the frame. Add the active gesture types to the frame struct and simplify usage. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.13v1.0.13Henrik Rydberg2010-09-101-1/+1
|
* Allow slow tappingHenrik Rydberg2010-09-101-1/+1
| | | | | | | For the benefit of hardware that cannot accurately meet the desirable response times, allow for tapping times up to 300 ms. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Inhibit taps immediately after a finger is liftedHenrik Rydberg2010-09-102-2/+7
| | | | | | | | | The intentional tap starts with a finger in the air. This patch treats the sequence up-down-up as unintentional, unless performed with a single finger. Fixes the problem with accidental taps during multi-finger gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Only emit abs events when motion is activeHenrik Rydberg2010-09-101-2/+9
| | | | | | | | | | | | | This bug was hidden behind the motion inhibit during tapping, but resurfaced when tapping from resting finger was introduced. With this patch, pointer movement is inhibited also when lifting fingers from the surface. Ideally, tapping should be treated as a transient event, which would allow zero pointer event also _before_ the tap, but presently unity seems to depend on the initial pointer movement as a touch-down event. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Cancel tapping also on zoom eventsHenrik Rydberg2010-09-091-1/+1
| | | | | | | | | The current code cancels tapping when dragging is active. This patch adds zooming to the set, to inhibit tapping also when a perfect zoom without dragging is performed. Reported-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Discard tapping even when there are zero events between down and upHenrik Rydberg2010-09-091-1/+1
| | | | | | | | | The current logic assumes there will be at least one frame with between touch up and touch down or the tap will not be properly timed out. Fixed with this patch. Reported-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Support legacy devicesHenrik Rydberg2010-09-093-2/+123
| | | | | | | | | Simulate MT touch events for legacy devices that support the DOUBLETAP, TRIPLETAP and QUADTAP events. This allows multi-finger tap and drag gestures to be emitted, providing a basic level of MT functionality for legacy devices. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make sure contact area is always definedHenrik Rydberg2010-09-091-0/+6
| | | | | | | | | Some devices do not always send touch_minor after touch_major has been set. According to the MT protocol, this case should be treated as if minor is equal to major. This patch makes sure touch_minor is never zero when touch_major is set. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.12v1.0.12Henrik Rydberg2010-09-011-1/+1
|
* Do not compute velocity until enough data is availableHenrik Rydberg2010-09-011-1/+1
| | | | | | | | The first few ticks since a configuration change are not really suited for velocity computation, so move the speed computation over to the periodic sampling point. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make orientation computation more robustHenrik Rydberg2010-08-301-5/+4
| | | | | | | | | The MT protocol defines the angle to be between -Pi/2 and Pi/2, and expects the defined range to be symmetric around zero. Make the angle computation more robust against varying definitions in the kernel drivers. Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
* grail v1.0.11v1.0.11Henrik Rydberg2010-08-261-1/+1
|
* Introduce tapping from any finger configurationHenrik Rydberg2010-08-262-50/+34
| | | | | | | | | | The current code only emits taps from zero fingers to N fingers. This patch introduces tapping from any prior finger configuration. A tap is defined as an increased number of fingers followed by a decrease within the tap timeout. A tap is reported as the maximum number of fingers present during the tap sequence. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Trim tapping timeoutsHenrik Rydberg2010-08-261-2/+2
| | | | | | Reduce the tapping timeout to 200 ms. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Correct abs event handlingHenrik Rydberg2010-08-263-24/+50
| | | | | | | | | | The current code lets abs events through during one-finger drags, and tapping does not work properly due to abs events not always being present during taps. Track the pointer position and emit abs events only if no gestures are in effect, and only if not explicitly filtered. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Plug hole in tentative gestures state during finger transitionHenrik Rydberg2010-08-262-7/+5
| | | | | | | | | During finger configuration transition, as well as after a tap, there would be no tentative gestures registered in the instantiator, leading to faulty emission of motion events. Fixed with this patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.10v1.0.10Henrik Rydberg2010-08-201-1/+1
|
* Declare missing header file for distro packageHenrik Rydberg2010-08-201-0/+1
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* grail v1.0.9v1.0.9Henrik Rydberg2010-08-191-1/+1
|
* Add contact information to the property listHenrik Rydberg2010-08-1910-191/+220
| | | | | | | | | | Add the five first contacts to the property list, and unify the handling of all gesture types in this regard. To avoid duplication, move the scaling of properties closer to the gesture recognizer. Move all gesture event handling code to grail-event.c, simplifying the structure somewhat. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Crank up the maximum number of propertiesHenrik Rydberg2010-08-191-1/+1
| | | | | | | | To prepare for the (for maverick only) addition of individual contact information via the properties array, increase the maximum number of contacts. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Use the touch_caps directly rather than grail_get_units()Henrik Rydberg2010-08-192-12/+16
|
* Add grail_contact and a method to retrieve the current contactsHenrik Rydberg2010-08-194-1/+101
| | | | | | | This patch adds the possibility to extract the current set of contacts from the grail state. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make gesture inserter visible to all local filesHenrik Rydberg2010-08-192-21/+30
| | | | | | Also remove the transformed flag in favor of a unit transformation. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Reserve one mask position for system useHenrik Rydberg2010-08-191-3/+7
| | | | | | This is needed for gesture propagation outside of grail. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>