Skip to content

Commit 32a5f35

Browse files
Fix cancelling workspace switch gesture (#2148)
Co-authored-by: Leo <[email protected]>
1 parent 74f91ae commit 32a5f35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/WindowManager.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,6 @@ namespace Gala {
22012201
if (!animating_switch_workspace) {
22022202
return;
22032203
}
2204-
animating_switch_workspace = cancel_action;
22052204

22062205
if (switch_workspace_window_created_id > 0) {
22072206
disconnect (switch_workspace_window_created_id);
@@ -2212,6 +2211,8 @@ namespace Gala {
22122211
switch_workspace_completed ();
22132212
}
22142213

2214+
animating_switch_workspace = cancel_action;
2215+
22152216
if (cancel_action) {
22162217
var cancel_direction = (animation_direction == Meta.MotionDirection.LEFT)
22172218
? Meta.MotionDirection.RIGHT
@@ -2293,8 +2294,7 @@ namespace Gala {
22932294
}
22942295

22952296
public override void kill_switch_workspace () {
2296-
// We don't care about animation direction, we don't want to cancel it, make it nudge so that it doesn't call switch_workspace_completed ()
2297-
switch_workspace_animation_finished (LEFT, false, true);
2297+
end_switch_workspace ();
22982298
}
22992299

23002300
public override void locate_pointer () {

0 commit comments

Comments
 (0)