summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Introduce gesture framesHenrik Rydberg2011-04-285-1/+885
| | | | | | | | | | This patch extends the API with parallel new/delete functions, aiming to eventually replace the open/close function. The new functions give access to the grail gesture frames, containing gestural transform information. This information is useful in its own right, and will eventually replace the internal recognizer. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Prepare for gesture frame additionsHenrik Rydberg2011-04-284-13/+15
| | | | | | | Rename internal variables and fix makefile to make room for new targets. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Expose utouch-frame through grail APIHenrik Rydberg2011-04-286-77/+126
| | | | | | | | Start a gentle API change by exposing utouch-frame through grail, and deprecating the grail_contact struct. Old programs compile and run fine. To only use the new api, compile with -DGRAIL_NO_LEGACY_API. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Added #includes to remove warnings from Clang.Jussi Pakkanen2011-04-283-0/+3
| | | | | Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Use visibility macros instead of symbol mapJussi Pakkanen2011-04-289-50/+63
| | | | | Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make headers work with C++Jussi Pakkanen2011-04-282-1/+17
| | | | | Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add Cflags to pkg configJussi Pakkanen2011-04-281-0/+1
| | | | | Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Remove the obsoleted transformation filterChase Douglas2011-04-121-18/+1
| | | | | | | | | | | | | | | Remove the additional filtering performed in the gestural transforms. This used to serve a purpose during development against devices without per-contact filtering. Since then, all devices are filtered, rendering the extra filtering obsolete. This patch also fixes a problem with rotation events. Currently, if you rotate very fast, the rotation angle will be close to the true angle. However, if you rotate very slow, the rotation angle will be much less than the true rotation angle. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Convert to utouch-frame mappingHenrik Rydberg2011-04-047-65/+39
| | | | | | | | Remove the grail-internal mapping code and rely directly on utouch-frame instead. Passes the unit test designed for this change. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce check test frameworkHenrik Rydberg2011-04-045-0/+187
| | | | | | | | | Add the check test framework, and add a simple test to check point to point mappings. The tests use the device files as input. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add some general gesture test dataHenrik Rydberg2011-04-0413-0/+13687
| | | | | | | Live recordings of gesture data is useful in many contexts. This patch adds an initial set of data. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Allow replay of device data through grailHenrik Rydberg2011-04-044-13/+66
| | | | | | | | | | | This patch adds replay capabilities to grail. If the specified device points to a valid evemu file, the device properties will be extracted from that file instead. Any appended event data will be replayed in realtime when calling grail_pull_mtdev(). In practise, grail_gesture may be executed with a test file. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Disable rotation gestures for semi-mt devicesChase Douglas2011-04-041-2/+5
| | | | | | | | To avoid poor user experience with semi-mt devices, disable rotation detection, such that only drag and scale is emitted. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Glue touch gestures as wellHenrik Rydberg2011-04-041-0/+4
| | | | | | | | | All motion-activated gestures are held for a short (glue) time to allow for direct transition to multi-finger gesture types. The touch gestures were mistakenly implemented without this. Fixed with this patch. LP: #748282 Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Also send EV_KEY through utouch-frameChase Douglas2011-04-041-1/+1
| | | | | | | | | To support semi-mt devices, buttons need to be scanned for touch count information. This patch adds EV_KEY to the set of event types sent through utouch-frame. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not discard a started gestureHenrik Rydberg2011-03-301-1/+1
| | | | | | | | | | | | Not all discarding code paths were taking the notion of a started gesture into account. Specifically, switching to a gesture of higher proiority would leave the old gesture without a finish. Fixed with this patch. Note that timeout implies not sent, so all discarding code paths are now covered. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not hold back active gesturesHenrik Rydberg2011-03-282-1/+4
| | | | | | | | | Gestures that has once been sent should never be held back. The current code would under some circumstance hold the gesture end event and later discard it. This oneliner solves the problem, which has been around since 241c5ec, Aug 2010. LP: #744391. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not treat single finger activation differentlyHenrik Rydberg2011-03-281-2/+2
| | | | | | | Single-finger drags should no longer behave differently from any other drag gesture. Fixed with this patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Never active gestures below activation thresholdHenrik Rydberg2011-03-281-7/+6
| | | | | | | | | | Currently, all gestures activate after a certain time, such that the smallest change result in gesture events. This was designed to minimize disruption in pointer movement. Since grail no longer handles pointers, the logic can be simplified to only activate when the threshold is reached. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Do not timeout gestures overlapping touch gesturesHenrik Rydberg2011-03-281-0/+22
| | | | | | | | The notion of listening to touch gestures implies that the touches of those gestures never timeout. Hence, any pending gesture that overlaps those touches should not timeout. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Decouple timeout from discardHenrik Rydberg2011-03-285-18/+23
| | | | | | | Move the actual gesture discard from the recognition phase to the instantiation phase. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce touch gesture eventsHenrik Rydberg2011-03-288-8/+146
| | | | | | | Touch gesture events follow the same logic as drags, except they cannot be held back but are emitted immediately. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Fix problem with tap properties at touch release -againHenrik Rydberg2011-03-241-1/+1
| | | | | | | | | This problem was fixed in the early grail stages, and reappeared in Aug 2010, in commit 241c5ec0. This one-liner fixes the problem, because the only interesting update to the properties state at maximum number of fingers is the end time. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Release version 1.0.20Henrik Rydberg2011-03-141-1/+1
|
* Make grabbing client exclusiveHenrik Rydberg2011-03-142-0/+11
| | | | | | | | | | | | | | | | When a possible gesture is started for a global client (sysflag set), it is desirable that gestures to other clients are disregarded until all contacts have left the surface. In principle this could be refined further, such that if gesture are not detected, they are passed on to other clients, but that also affects how touches are passed onto lower layers like XI2.1, so simply making sure a global system client gets all events potentially leading to gestures is good enough for now. Also note that in the current combination of synaptics/evdev X servers and grail, there can be no overlapping potential gestures between two global clients, or the resulting event recipient is not correct. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make reset logic of pinch and drag same as for dragHenrik Rydberg2011-03-142-2/+2
| | | | | | | | There is no direct reason for one-fingered pinch/rotate gestures to be discarded immediately, so only reset gestures on touch down, as for drags. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Reset tap state after timeoutHenrik Rydberg2011-03-141-0/+6
| | | | | | | A touch and hold will not properly reset the tap state, such that the next tap fails to register. Fixed with this patch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Ignore generated symbols fileHenrik Rydberg2011-03-141-0/+1
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Adjust gesture buffer sizes and timingsHenrik Rydberg2011-03-142-4/+4
| | | | | | | | Adjust timings to put drag, pinch and rotate on more equal footing, with regard to gesture timeouts. Also make sure events are not lost during hold, now that all MT events are buffered as well. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Skip events selectivelyHenrik Rydberg2011-03-141-7/+40
| | | | | | | | | Buffer all events as planned, but strip the stream of all events involved with pointer and MT, rather than bluntly removing all events. In practise, this means button and switch events are let through, undistorted although possibly slightly delayed. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Wait for the right number of fingers before gesture timeoutHenrik Rydberg2011-03-141-1/+3
| | | | | | | | | A client listening only for multi-finger gestures will not get the chance to recognize unless there is a gesture timeout. This patch waits until the drag hold time has passed before releasing the touch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce activation hold timeHenrik Rydberg2011-03-142-1/+5
| | | | | | | | Do not activate a drag, pinch or rotate immediately, even if the activation threshold is met. This allows for a smoother transition between fingers. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce gesture timeoutsHenrik Rydberg2011-03-148-139/+98
| | | | | | | | | The timeout of a gesture is integral to the gesture type. This patch introduces timeout per gesture type, potentially enabling more control over gesture timing aspects. The timeout logic replaces the recently added recognition state. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* 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>