Skip to content

Commit 294a3b8

Browse files
committed
Fix cancelling workspace switch gesture
1 parent 9d0e352 commit 294a3b8

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
@@ -2199,7 +2199,6 @@ namespace Gala {
21992199
if (!animating_switch_workspace) {
22002200
return;
22012201
}
2202-
animating_switch_workspace = cancel_action;
22032202

22042203
if (switch_workspace_window_created_id > 0) {
22052204
disconnect (switch_workspace_window_created_id);
@@ -2210,6 +2209,8 @@ namespace Gala {
22102209
switch_workspace_completed ();
22112210
}
22122211

2212+
animating_switch_workspace = cancel_action;
2213+
22132214
if (cancel_action) {
22142215
var cancel_direction = (animation_direction == Meta.MotionDirection.LEFT)
22152216
? Meta.MotionDirection.RIGHT
@@ -2291,8 +2292,7 @@ namespace Gala {
22912292
}
22922293

22932294
public override void kill_switch_workspace () {
2294-
// 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 ()
2295-
switch_workspace_animation_finished (LEFT, false, true);
2295+
end_switch_workspace ();
22962296
}
22972297

22982298
public override void locate_pointer () {

0 commit comments

Comments
 (0)