Merge lp://staging/~oif-team/grail/trunk.glue into lp://staging/grail

Proposed by Henrik Rydberg
Status: Rejected
Rejected by: Daniel d'Andrada
Proposed branch: lp://staging/~oif-team/grail/trunk.glue
Merge into: lp://staging/grail
Diff against target: 47689 lines (+45855/-1254)
35 files modified
include/grail-bits.h (+2/-0)
include/grail.h (+22/-25)
include/grail.h.orig (+273/-51)
src/Makefile.am (+0/-7)
src/gestures-drag.c (+0/-135)
src/gestures-pinch.c (+0/-129)
src/gestures-rotate.c (+0/-128)
src/gestures-tapping.c (+0/-100)
src/gestures-touch.c (+0/-98)
src/grail-api.c (+7/-180)
src/grail-bits.c (+10/-0)
src/grail-frame.c (+97/-3)
src/grail-gestures.c (+0/-210)
src/grail-gestures.h (+0/-115)
src/grail-impl.h (+30/-0)
src/grail-init.c (+16/-3)
src/grail-inserter.c (+0/-33)
src/grail-inserter.h (+31/-2)
src/grail-legacy.c (+105/-0)
src/grail-recognizer.c (+344/-15)
src/grail-recognizer.h (+89/-5)
test/Makefile.am (+1/-0)
test/check-gestures.c (+204/-0)
test/check-grail.c (+2/-0)
test/io/functional/drag-1.evemu (+3988/-0)
test/io/functional/drag-2.evemu (+3849/-0)
test/io/functional/drag-3.evemu (+16278/-0)
test/io/functional/drag-4.evemu (+8032/-0)
test/io/functional/hold-1.evemu (+1375/-0)
test/io/functional/pinch-2.evemu (+2457/-0)
test/io/functional/pinch-3.evemu (+4971/-0)
test/io/functional/rotate-2.evemu (+3073/-0)
test/io/functional/tap-1.evemu (+94/-0)
test/io/functional/tap-4.evemu (+388/-0)
tools/grail-gesture.c (+117/-15)
To merge this branch: bzr merge lp://staging/~oif-team/grail/trunk.glue
Reviewer Review Type Date Requested Status
Open Input Framework Team Pending
Review via email: mp+60062@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-05-02.

Description of the change

This branch is a rebase of grail2.next, with one important change; it uses EXPECT_DRAG to trigger drag events, but it uses CENTER to report drag events. This presents a simple and accurate solution to the drag problem, where

1. All applications can rely on the drag events not to be lost.

2. All applications treat rotation around a finger as rotation, even if not listened for.

3. Apps not using rotation behaves the same as before, but pure rotation gestures will rightfully not be detected as drag.

4. Apps wanting more accurate/detailed drag/rotation behavior should use gesture frames directly instead.

This branch has been tested with unity on an XT2, which good feel. It seems the solution does not have to be more complicated than this.

To post a comment you must log in.
Revision history for this message
Henrik Rydberg (rydberg) wrote : Posted in a previous version of this proposal

Two more patches, further enhancing the unity gesture experience. The first one fixes a problem with the rewritten recognizer, and the second finally gives very clear and distinct recognition of all of drag, pinch and rotate.

Tested in unity and eog. Rotating the picture is effortless, with no side effects. Pinching to zoom is effortless (although eog seems to have some problems there). Dragging with one or two fingers (touchscreen) works just fine, no side effects.

IMHO, this is the best linux gesture experience I have had so far.

Enjoy,
Henrik

Revision history for this message
Henrik Rydberg (rydberg) wrote : Posted in a previous version of this proposal

Upon request, added some more explanation of the structs used in gru and gin.

Also, this merge is against trunk, but 2.x would be fine too, as discussed (they are equal atm).

Revision history for this message
Henrik Rydberg (rydberg) wrote :

The branch has been updated with a more logical patch sequence, some bug fixes, and more importantly, with a gesture test suite, framing the critical modifications to the recognizer. The tests are real-time gesture recognition checks, are run using make check, and take about a minute to perform (with serial execution). At the introduction of the suite, several tests fail intentionally, because of the inability of the current grail to separate drag and rotation gestures. After the switch to grail2 and tuning, all tests pass. So, from the point of view of the tests, this branch presents a major improvement over grail1. Manual tests using unity, evince and eog point at the same thing.

I think this is it, guys. Enjoy!

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

I created a new branch of this which merges trunk:

https://code.launchpad.net/~jpakkane/utouch-grail/glue-work

It has some conflicts, mainly due to Chase's removal of center of start frame. I got it to compile but some tests fail. I'll look into it next. Also there probably some latent issues there.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

It's been open for almost an year now. Thus closing it to help "keep the desk clean".
Please reopen if this merge is still relevant and wanted.

Unmerged revisions

166. By Henrik Rydberg

Add XI2 support to grail-gesture

Use the grail2 API to implement the event loop using XI events.

Signed-off-by: Henrik Rydberg <email address hidden>

165. By Henrik Rydberg

Move grail engine into pump function

Move the grail engine into the pump function, and make init/destroy
equivalent to open/close, if gesture callbacks are defined. This way,
pulling can be replaced by pumping. This concludes the grail2 API.

Signed-off-by: Henrik Rydberg <email address hidden>

164. By Henrik Rydberg

Trim the pinch and rotate bars

Gesture testing reveals a tendency to favor rotate over pinch for
small rotations. This patch lowers the pinch bar and increase the
rotate bar, leading to a more accurate recognition of both pinch
and rotate.

With this patch, all gesture tests are passing.

Signed-off-by: Henrik Rydberg <email address hidden>

163. By Henrik Rydberg

Lower priority of pinch

When performing a rotate gesture, it is very common to also trigger
the pinch primitive. Conversely, during a pinch, rotate or drag are
seldom triggered. This patch lowers the priority of pinch gestures in
favor of rotate and drag, leading to a distinct recognition of all
three basic gestures.

Signed-off-by: Henrik Rydberg <email address hidden>

162. By Henrik Rydberg

Replace recognizer with gesture frames

This patch replaces the internal recognizer with one based on the
gesture frame elements. Fully functional, and equivalent to the
previous implementation.

With this patch, the pinch tests are no longer failing, while the drag
tests still have false positives from rotation.

Signed-off-by: Henrik Rydberg <email address hidden>

161. By Henrik Rydberg

Add a gesture test suite

To ensure correctness when replacing of the internal recognizer, add a
test suite of real-time gestures. The tests take about a minute to
perform on any computer (serial mode).

Note that some of the tests are designed to fail at this stage; the
failures represent the inability of the current code to separate some
drag and rotate gestures.

Signed-off-by: Henrik Rydberg <email address hidden>

160. By Henrik Rydberg

Always output the global gesture frame

Currently, the global gesture frame is not output for one- and
two-finger gestures, but the per-contact-pair gesture elements
are used in its stead. This leads to undesired behavior when a
finger leaves the surface; it suffices to consider the start time
of a single-finger drag to see that the glue time is not respected
in that case. This patch makes sure the global gesture is always
output, such that any finger combination change leads to a restarted
gesture element.

Signed-off-by: Henrik Rydberg <email address hidden>

159. By Henrik Rydberg

Add missing grail element member documentation

The documentation of moveness in the grail_element struct got lost, fixed
with this patch.

Signed-off-by: Henrik Rydberg <email address hidden>

158. By Henrik Rydberg

Add inner product to grail bits api

Move the implementation of inner product to a more public place.

Signed-off-by: Henrik Rydberg <email address hidden>

157. By Henrik Rydberg

Deprecate open/close

Move the open/close api functions to the legacy area. No functional
changes.

Signed-off-by: Henrik Rydberg <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: