diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 7fc9d3409..1160b2d1a 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -113,6 +113,7 @@ namespace Gala { private GestureTracker gesture_tracker; private bool animating_switch_workspace = false; + private bool animating_nudge = false; private bool switch_workspace_with_gesture = false; /** @@ -529,7 +530,7 @@ namespace Gala { * {@inheritDoc} */ public void switch_to_next_workspace (Meta.MotionDirection direction) { - if (animating_switch_workspace) { + if (animating_switch_workspace || animating_nudge) { return; } @@ -554,7 +555,7 @@ namespace Gala { return; } - animating_switch_workspace = true; + animating_nudge = true; var nudge_gap = NUDGE_GAP * InternalUtils.get_ui_scaling_factor (); float dest = 0; @@ -586,7 +587,7 @@ namespace Gala { ui_group.add_transition ("nudge", nudge_gesture); switch_workspace_with_gesture = false; - animating_switch_workspace = false; + animating_nudge = false; }; if (!switch_workspace_with_gesture) { @@ -603,7 +604,7 @@ namespace Gala { nudge.set_key_frames (keyframes); nudge.set_values (x); nudge.completed.connect (() => { - animating_switch_workspace = false; + animating_nudge = false; }); ui_group.add_transition ("nudge", nudge); @@ -1763,6 +1764,7 @@ namespace Gala { || AnimationDuration.WORKSPACE_SWITCH == 0 || (direction != Meta.MotionDirection.LEFT && direction != Meta.MotionDirection.RIGHT) || animating_switch_workspace + || animating_nudge || workspace_view.is_opened () || window_overview.is_opened ()) { animating_switch_workspace = false;