Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.78 KB | None | 0 0
  1. diff --git a/src/WindowManager.vala b/src/WindowManager.vala
  2. index ce2950e..817b307 100644
  3. --- a/src/WindowManager.vala
  4. +++ b/src/WindowManager.vala
  5. @@ -159,6 +159,28 @@ namespace Gala
  6.  
  7.                         WorkspaceManager.init (this);
  8.  
  9. +                       var switch_action = new Clutter.SwipeAction();
  10. +                       switch_action.n_touch_points = 3;
  11. +                       switch_action.set_threshold_trigger_distance(50, 50);
  12. +                       switch_action.swipe.connect((actor, direction) => {
  13. +                               switch (direction) {
  14. +                                       case Clutter.SwipeDirection.LEFT:
  15. +                                               switch_to_next_workspace(MotionDirection.LEFT);
  16. +                                               return true;
  17. +                                       case Clutter.SwipeDirection.RIGHT:
  18. +                                               switch_to_next_workspace(MotionDirection.RIGHT);
  19. +                                               return true;
  20. +                                       case Clutter.SwipeDirection.UP:
  21. +                                               workspace_view.open();
  22. +                                               return true;
  23. +                                       case Clutter.SwipeDirection.DOWN:
  24. +                                               workspace_view.close();
  25. +                                               return true;
  26. +                               }
  27. +                               return false;
  28. +                       });
  29. +                       stage.add_action(switch_action);
  30. +
  31.                         /* our layer structure, copied from gnome-shell (from bottom to top):
  32.                          * stage
  33.                          * + system background
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement