Skip to content

Commit 91819b7

Browse files
committed
WindowClone: don't animate target properties
1 parent 55ff1c9 commit 91819b7

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,11 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
230230
}
231231

232232
/**
233-
* Animate the window to the given slot
233+
* Sets the window slot.
234234
*/
235-
public void take_slot (Mtk.Rectangle rect, bool animate) {
235+
public void set_slot (Mtk.Rectangle rect) {
236236
slot = rect;
237-
238-
if (animate) {
239-
save_easing_state ();
240-
set_easing_duration (Utils.get_animation_duration (MultitaskingView.ANIMATION_DURATION));
241-
set_easing_mode (EASE_OUT_QUAD);
242-
}
243-
244237
update_targets ();
245-
246-
if (animate) {
247-
restore_easing_state ();
248-
}
249238
}
250239

251240
private void update_targets () {

src/Widgets/MultitaskingView/WindowCloneContainer.vala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class Gala.WindowCloneContainer : ActorTarget {
5757
if (clone == null) {
5858
clone = new WindowClone (wm, window, monitor_scale, overview_mode);
5959
clone.selected.connect ((_clone) => window_selected (_clone.window));
60-
clone.request_reposition.connect (() => reflow (false));
60+
clone.request_reposition.connect (reflow);
6161
bind_property ("monitor-scale", clone, "monitor-scale");
6262
}
6363

@@ -76,7 +76,7 @@ public class Gala.WindowCloneContainer : ActorTarget {
7676

7777
// Don't reflow if only the sorting changed
7878
if (to_remove.size () > 0 || added != removed) {
79-
reflow (false);
79+
reflow ();
8080
}
8181
}
8282

@@ -97,7 +97,7 @@ public class Gala.WindowCloneContainer : ActorTarget {
9797
}
9898

9999
windows.sort ();
100-
reflow (true);
100+
reflow ();
101101
} else if (action == MULTITASKING_VIEW) { // If we are open we only want to restack when we close
102102
windows.sort ();
103103
}
@@ -121,7 +121,7 @@ public class Gala.WindowCloneContainer : ActorTarget {
121121
/**
122122
* Recalculate the tiling positions of the windows and animate them to the resulting spots.
123123
*/
124-
private void reflow (bool view_toggle) {
124+
private void reflow () {
125125
if (!opened || get_n_children () == 0) {
126126
return;
127127
}
@@ -148,7 +148,7 @@ public class Gala.WindowCloneContainer : ActorTarget {
148148
};
149149

150150
foreach (var tilable in calculate_grid_placement (area, windows)) {
151-
tilable.clone.take_slot (tilable.rect, !view_toggle);
151+
tilable.clone.set_slot (tilable.rect);
152152
}
153153
}
154154

0 commit comments

Comments
 (0)