-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce GestureController #2258
Conversation
dd8f1c7
to
f61800f
Compare
8c012c3
to
85574e7
Compare
b676115
to
e1d561a
Compare
Btw there are quite a few constants we can play with here. |
5fe19be
to
434b79a
Compare
5938f46
to
a054bd9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
a054bd9
to
a2e64a4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
c51cedc
to
c7cf495
Compare
c7cf495
to
c2199ce
Compare
This comment was marked as resolved.
This comment was marked as resolved.
c2199ce
to
0e2b17e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
0e2b17e
to
5f14483
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. This feels fantastic, looking forward great stuff it allows us to do 🎉
5f14483
to
60302fc
Compare
This is ready for review now. It's a pretty big PR which is unfortunately necessary because it changes how the whole gesture propagation works. For an easier review you can go with the separate commits. Use rebase to merge.
An overview of the changes:
We go from a gesturetracker that only know about the current gesture and not "where we currently are", and which sends signals to gesturepropertytransitions which are created new for every gesture, to a gesturecontroller that keeps a persistent double progress which represents the state of the UI, that is affected by the gesture action that this gesturecontroller has. E.g. 0 for multitaskingview closed, 1 for it opened. 0 for first workspace, -1 for second, -2 for third etc. It hereby snaps to full integer values and can be bounded by upper and lower limits.
We also go from sending signals to propagating gesture events via a hierarchy of GestureTargets with the root being given to the controller.
Currently there are PropertyTargets that manipulate a property of a clutter actor, and ActorTargets that propagate the gesture events to direct descendants that are also actortargets. ActorTargets can also take other gesturetargets (e.g. PropertyTargets) and automatically propagate gesture events to them.
Since gesture targets can receive events from multiple controllers, events are connected to a string id (this will be required for #1733).
The advantages from this PR:
Follow up:
Fixes #2279