| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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 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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Reduce the tapping timeout to 200 ms.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| |
|
|
|
|
|
| |
This patch adds the possibility to extract the current set of
contacts from the grail state.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
| |
Also remove the transformed flag in favor of a unit transformation.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
| |
To be able to model touch information uniformly across all supported
devices, the semantics of the touch attributes has to be treated
explicitly. Drop the generic touch property array and replace it
by an actual structure. In addition, the touch-engine abstraction
turned out to not be needed, so drop it as well.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| | |
|
| |
|
|
|
|
|
|
| |
By calling the grail_set_bbox(), grail will do translation of api
coordinates and matching properties to an external coordinate system,
such as screen coordinates.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
|
|
|
|
| |
With meta gestures, the gesture starts given a certain number of
fingers, but can then continue even if the number of fingers change.
By configuration, such gestures live on a different priority plane
from normal gestures. To match window manager specs, this patch adds
the environment and meta planes, and add drag, pinch and rotate gestures
initiated with three and four fingers, respectively.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
| |
Not counting the BTN_TOUCH event implied not emitting the sync
event, which confused evdev.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
| |
Use angle units, such that a complete revolution corresponds
to 2 pi.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
| |
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
| |
Reinsert BTN_TOUCH depending on the drag gesture
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
| |
Also connect the timeout for press with the timeout of tapping.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|
| |
|
|
|
|
|
| |
Always send drag events for one-finger touches, but only filter
the ABS_X/Y events if grail_filter_abs_events() is set to true.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
|