Skip to content

Commit 3f555db

Browse files
committed
MultitaskingView: Stop events from propagating while closed
This fixes an issue where you could initiate a drag and drop while the workspace switch animation finished which looks very strange.
1 parent 0cd8f3b commit 3f555db

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Widgets/MultitaskingView/MultitaskingView.vala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,5 +508,19 @@ namespace Gala {
508508

509509
return true;
510510
}
511+
512+
public override bool captured_event (Clutter.Event event) {
513+
/* If we aren't open but receive events this means we are animating closed
514+
* or we are finishing a workspace switch animation. In any case we want to
515+
* prevent a drag and drop to start for the window clones which can happen
516+
* pretty easily if you click on one while the animation finishes.
517+
*/
518+
var type = event.get_type (); // LEAVE and ENTER have to be propagated
519+
if (!opened && animating && type != ENTER && type != LEAVE) {
520+
return Clutter.EVENT_STOP;
521+
}
522+
523+
return Clutter.EVENT_PROPAGATE;
524+
}
511525
}
512526
}

0 commit comments

Comments
 (0)