Skip to content

Commit 9dd97f5

Browse files
committed
MultitaskingView: Use new touchscreen backend
1 parent d0e98b3 commit 9dd97f5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Widgets/MultitaskingView/MultitaskingView.vala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class Gala.MultitaskingView : ActorTarget, RootTarget, ActivatableCompone
6363

6464
multitasking_gesture_controller = new GestureController (MULTITASKING_VIEW, wm, MULTITASKING_VIEW);
6565
multitasking_gesture_controller.enable_touchpad (wm.stage);
66+
multitasking_gesture_controller.enable_touchscreen (wm.stage);
6667
add_gesture_controller (multitasking_gesture_controller);
6768

6869
add_target (ShellClientsManager.get_instance ()); // For hiding the panels
@@ -74,6 +75,7 @@ public class Gala.MultitaskingView : ActorTarget, RootTarget, ActivatableCompone
7475
follow_natural_scroll = true,
7576
};
7677
workspaces_gesture_controller.enable_touchpad (wm.stage);
78+
workspaces_gesture_controller.enable_touchscreen (wm.stage);
7779
workspaces_gesture_controller.enable_scroll (this, HORIZONTAL);
7880
add_gesture_controller (workspaces_gesture_controller);
7981

@@ -254,6 +256,14 @@ public class Gala.MultitaskingView : ActorTarget, RootTarget, ActivatableCompone
254256
workspaces_gesture_controller.cancel_gesture ();
255257
}
256258

259+
public override float get_travel_distance (GestureAction for_action) {
260+
switch (for_action) {
261+
case MULTITASKING_VIEW: return primary_monitor_container.get_height () * 0.5f;
262+
case SWITCH_WORKSPACE: return workspaces.get_first_child ().get_width ();
263+
default: return 0;
264+
}
265+
}
266+
257267
public override void start_progress (GestureAction action) {
258268
if (!visible) {
259269
opened = true;

0 commit comments

Comments
 (0)