@@ -112,6 +112,7 @@ public class Gala.WindowClone : Clutter.Actor {
112112 window. notify[" fullscreen" ]. connect (check_shadow_requirements);
113113 window. notify[" maximized-horizontally" ]. connect (check_shadow_requirements);
114114 window. notify[" maximized-vertically" ]. connect (check_shadow_requirements);
115+ window. size_changed. connect (() = > request_reposition ());
115116
116117 if (overview_mode) {
117118 var click_action = new Clutter .ClickAction ();
@@ -180,16 +181,14 @@ public class Gala.WindowClone : Clutter.Actor {
180181 * at this point it will animate to it. Otherwise it will just place
181182 * itself at the location of the original window. Also adds the shadow
182183 * effect and makes sure the shadow is updated on size changes.
183- *
184- * @param was_waiting Internal argument used to indicate that we had to
185- * wait before the window's texture became available.
186184 */
187- private void load_clone (bool was_waiting = false ) {
185+ private void load_clone () {
188186 var actor = (Meta . WindowActor ) window. get_compositor_private ();
189187 if (actor == null ) {
190188 Idle . add (() = > {
191- if (window. get_compositor_private () != null )
192- load_clone (true );
189+ if (window. get_compositor_private () != null ) {
190+ load_clone ();
191+ }
193192 return Source . REMOVE ;
194193 });
195194
@@ -214,18 +213,6 @@ public class Gala.WindowClone : Clutter.Actor {
214213 if (should_fade ()) {
215214 opacity = 0 ;
216215 }
217-
218- // if we were waiting the view was most probably already opened when our window
219- // finally got available. So we fade-in and make sure we took the took place.
220- // If the slot is not available however, the view was probably closed while this
221- // window was opened, so we stay at our old place.
222- if (was_waiting && slot != null ) {
223- opacity = 0 ;
224- take_slot (slot, true );
225- opacity = 255 ;
226-
227- request_reposition ();
228- }
229216 }
230217
231218 private void check_shadow_requirements () {
@@ -268,7 +255,7 @@ public class Gala.WindowClone : Clutter.Actor {
268255 *
269256 * @param animate Animate the transformation of the placement
270257 */
271- public void transition_to_original_state (bool with_gesture = false , bool is_cancel_animation = false ) {
258+ public void transition_to_original_state (bool with_gesture = false ) {
272259 var outer_rect = window. get_frame_rect ();
273260
274261 unowned var display = window. get_display ();
@@ -295,9 +282,9 @@ public class Gala.WindowClone : Clutter.Actor {
295282 * Animate the window to the given slot
296283 */
297284#if HAS_MUTTER45
298- public void take_slot (Mtk .Rectangle rect , bool from_window_position , bool with_gesture = false , bool is_cancel_animation = false ) {
285+ public void take_slot (Mtk .Rectangle rect , bool from_window_position , bool with_gesture = false ) {
299286#else
300- public void take_slot (Meta . Rectangle rect, bool from_window_position, bool with_gesture = false , bool is_cancel_animation = false ) {
287+ public void take_slot (Meta . Rectangle rect, bool from_window_position, bool with_gesture = false ) {
301288#endif
302289 slot = rect;
303290 active = false ;
0 commit comments