1919 * it will be a hard boundary, if they are fractional it will slow the gesture progress when over the
2020 * limit simulating a kind of spring that pushes against it.
2121 * Note that the progress snaps to full integer values after a gesture ends.
22- * Events are always shared between all GestureControllers with the same id .
22+ * Events are always shared between all GestureControllers in the same group (except for the group NONE) .
2323 * This means that two gestures that can be done in one motion (e.g. horizontal and vertical swipe)
24- * can be done simultaneously if each of two GestureControllers with the same id handle one of
24+ * can be done simultaneously if each of two GestureControllers in the same group handle one of
2525 * the gestures.
2626 */
2727public class Gala.GestureController : Object {
28+ public enum Group {
29+ NONE ,
30+ MULTITASKING_VIEW ,
31+ }
32+
2833 /**
2934 * When a gesture ends with a velocity greater than this constant, the action is not cancelled,
3035 * even if the animation threshold has not been reached.
@@ -38,7 +43,7 @@ public class Gala.GestureController : Object {
3843
3944 public GestureAction action { get ; construct; }
4045 public WindowManager wm { get ; construct; }
41- public string ? id { get ; construct; }
46+ public Group group { get ; construct; }
4247
4348 private unowned RootTarget ? _target;
4449 public RootTarget target {
@@ -96,8 +101,8 @@ public class Gala.GestureController : Object {
96101
97102 private SpringTimeline ? timeline;
98103
99- public GestureController (GestureAction action, WindowManager wm, string ? id = null ) {
100- Object (action: action, wm: wm, id : id );
104+ public GestureController (GestureAction action, WindowManager wm, Group group = NONE ) {
105+ Object (action: action, wm: wm, group : group );
101106 }
102107
103108 /**
@@ -115,7 +120,7 @@ public class Gala.GestureController : Object {
115120
116121 public void enable_touchpad (Clutter . Actor actor) {
117122 if (Meta . Util . is_wayland_compositor ()) {
118- touchpad_backend = new TouchpadBackend (actor, id );
123+ touchpad_backend = new TouchpadBackend (actor, group );
119124 touchpad_backend. on_gesture_detected. connect (gesture_detected);
120125 touchpad_backend. on_begin. connect (gesture_begin);
121126 touchpad_backend. on_update. connect (gesture_update);
0 commit comments