@@ -113,6 +113,7 @@ namespace Gala {
113113
114114 private GestureTracker gesture_tracker;
115115 private bool animating_switch_workspace = false ;
116+ private bool animating_nudge = false ;
116117 private bool switch_workspace_with_gesture = false ;
117118
118119 /**
@@ -529,7 +530,7 @@ namespace Gala {
529530 * {@inheritDoc }
530531 */
531532 public void switch_to_next_workspace (Meta .MotionDirection direction ) {
532- if (animating_switch_workspace) {
533+ if (animating_switch_workspace || animating_nudge ) {
533534 return ;
534535 }
535536
@@ -554,7 +555,7 @@ namespace Gala {
554555 return ;
555556 }
556557
557- animating_switch_workspace = true ;
558+ animating_nudge = true ;
558559 var nudge_gap = NUDGE_GAP * InternalUtils . get_ui_scaling_factor ();
559560
560561 float dest = 0 ;
@@ -586,7 +587,7 @@ namespace Gala {
586587 ui_group. add_transition (" nudge" , nudge_gesture);
587588
588589 switch_workspace_with_gesture = false ;
589- animating_switch_workspace = false ;
590+ animating_nudge = false ;
590591 };
591592
592593 if (! switch_workspace_with_gesture) {
@@ -603,7 +604,7 @@ namespace Gala {
603604 nudge. set_key_frames (keyframes);
604605 nudge. set_values (x);
605606 nudge. completed. connect (() = > {
606- animating_switch_workspace = false ;
607+ animating_nudge = false ;
607608 });
608609
609610 ui_group. add_transition (" nudge" , nudge);
@@ -1763,6 +1764,7 @@ namespace Gala {
17631764 || AnimationDuration . WORKSPACE_SWITCH == 0
17641765 || (direction != Meta . MotionDirection . LEFT && direction != Meta . MotionDirection . RIGHT )
17651766 || animating_switch_workspace
1767+ || animating_nudge
17661768 || workspace_view. is_opened ()
17671769 || window_overview. is_opened ()) {
17681770 animating_switch_workspace = false ;
0 commit comments