-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
base: main
Are you sure you want to change the base?
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
Looks very good. Feels so smooth, and the animation when closing multitasking view while the workspaces are switching is unbelievable. Looking forward merging this One issue I noticed is when I switch from the last workspace I get frame drops (??) 2025-02-17.17-54-57.mp4 |
Also a new bug I noticed: 2025-02-17.18-23-14.mp4The video suddenly ends because gala crashed when I dropped calculator window on a last workspace. Here's a backtrace:
|
a054bd9
to
a2e64a4
Compare
I think this might be a touchegg bug. I can only reproduce it using the touchpad backend (i.e. three fingers or whatever you've configured) and not when using the native scroll backend (two fingers). Also I did some testing and got a touchpad swipe event in clutter a full 2 seconds before receiving the gesture event from touchegg... |
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: