| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This tool tests the transform capabilities of grail. Similar to a
map application, one can use a single finger, two fingers, a whole
hand or two hands to move the rectangle around, scale and rotate it.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
| |
A new tool (test-mtdev) is added, showing the usage of gesture frames.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
| |
Start the gesture frame test suite with some basic coordinate
mapping tests.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
| |
Add some notes on the math of the gesture frame computations.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Rename internal variables and fix makefile to make room for new
targets.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
| |
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
| |
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
| |
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Move the actual gesture discard from the recognition phase
to the instantiation phase.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Found by using -Wall -Werror
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|