@@ -288,12 +288,17 @@ public class Gala.WindowClone : Clutter.Actor {
288288 in_slot_animation = true ;
289289 place_widgets (outer_rect. width, outer_rect. height, initial_scale);
290290
291- new GesturePropertyTransition (this , gesture_tracker, " x" , null , (float ) target_x, with_gesture);
292- new GesturePropertyTransition (this , gesture_tracker, " y" , null , (float ) target_y, with_gesture);
293- new GesturePropertyTransition (this , gesture_tracker, " width" , null , (float ) outer_rect. width, with_gesture);
294- new GesturePropertyTransition (this , gesture_tracker, " height" , null , (float ) outer_rect. height, with_gesture);
295- new GesturePropertyTransition (this , gesture_tracker, " shadow-opacity" , 255f , 0f , with_gesture);
296- new GesturePropertyTransition (window_icon, gesture_tracker, " opacity" , 255f , 0f , with_gesture);
291+ new GesturePropertyTransition (this , gesture_tracker, " x" , null , (float ) target_x). start (with_gesture);
292+ new GesturePropertyTransition (this , gesture_tracker, " y" , null , (float ) target_y). start (with_gesture);
293+ new GesturePropertyTransition (this , gesture_tracker, " width" , null , (float ) outer_rect. width). start (with_gesture);
294+ new GesturePropertyTransition (this , gesture_tracker, " height" , null , (float ) outer_rect. height). start (with_gesture);
295+ new GesturePropertyTransition (this , gesture_tracker, " shadow-opacity" , 255f , 0f ). start (with_gesture);
296+ var opacity_transition = new GesturePropertyTransition (window_icon, gesture_tracker, " opacity" , 255f , 0f );
297+ opacity_transition. start (with_gesture);
298+ opacity_transition. done. connect (() = > {
299+ in_slot_animation = false ;
300+ place_widgets (outer_rect. width, outer_rect. height, target_scale);
301+ });
297302
298303 GestureTracker . OnUpdate on_animation_update = (percentage) = > {
299304 var width = GestureTracker . animation_value (initial_width, outer_rect. width, percentage);
@@ -320,17 +325,6 @@ public class Gala.WindowClone : Clutter.Actor {
320325 window_icon. set_easing_duration (duration);
321326 set_window_icon_position (outer_rect. width, outer_rect. height, target_scale);
322327 window_icon. restore_easing_state ();
323-
324- var transition = window_icon. get_transition (" opacity" );
325- if (transition != null ) {
326- transition. completed. connect (() = > {
327- in_slot_animation = false ;
328- place_widgets (outer_rect. width, outer_rect. height, target_scale);
329- });
330- } else {
331- in_slot_animation = false ;
332- place_widgets (outer_rect. width, outer_rect. height, target_scale);
333- }
334328 };
335329
336330 if (! animate || gesture_tracker == null || ! with_gesture || ! wm. enable_animations) {
@@ -359,12 +353,17 @@ public class Gala.WindowClone : Clutter.Actor {
359353 in_slot_animation = true ;
360354 place_widgets (rect. width, rect. height, scale);
361355
362- new GesturePropertyTransition (this , gesture_tracker, " x" , null , (float ) rect. x, with_gesture);
363- new GesturePropertyTransition (this , gesture_tracker, " y" , null , (float ) rect. y, with_gesture);
364- new GesturePropertyTransition (this , gesture_tracker, " width" , null , (float ) rect. width, with_gesture);
365- new GesturePropertyTransition (this , gesture_tracker, " height" , null , (float ) rect. height, with_gesture);
366- new GesturePropertyTransition (this , gesture_tracker, " shadow-opacity" , 0f , 255f , with_gesture);
367- new GesturePropertyTransition (window_icon, gesture_tracker, " opacity" , 0f , 255f , with_gesture);
356+ new GesturePropertyTransition (this , gesture_tracker, " x" , null , (float ) rect. x). start (with_gesture);
357+ new GesturePropertyTransition (this , gesture_tracker, " y" , null , (float ) rect. y). start (with_gesture);
358+ new GesturePropertyTransition (this , gesture_tracker, " width" , null , (float ) rect. width). start (with_gesture);
359+ new GesturePropertyTransition (this , gesture_tracker, " height" , null , (float ) rect. height). start (with_gesture);
360+ new GesturePropertyTransition (this , gesture_tracker, " shadow-opacity" , 0f , 255f ). start (with_gesture);
361+ var opacity_transition = new GesturePropertyTransition (window_icon, gesture_tracker, " opacity" , 0f , 255f );
362+ opacity_transition. start (with_gesture);
363+ opacity_transition. done. connect (() = > {
364+ in_slot_animation = false ;
365+ place_widgets (rect. width, rect. height, scale);
366+ });
368367
369368 GestureTracker . OnUpdate on_animation_update = (percentage) = > {
370369 var width = GestureTracker . animation_value (initial_width, rect. width, percentage);
@@ -380,25 +379,13 @@ public class Gala.WindowClone : Clutter.Actor {
380379
381380 var duration = wm. enable_animations ? MultitaskingView . ANIMATION_DURATION : 0 ;
382381
383-
384382 window_icon. save_easing_state ();
385383 window_icon. set_easing_mode (Clutter . AnimationMode . EASE_OUT_QUAD );
386384 window_icon. set_easing_duration (duration);
387385 set_window_icon_position (rect. width, rect. height, scale);
388386 window_icon. restore_easing_state ();
389387
390388 toggle_shadow (true );
391-
392- var transition = window_icon. get_transition (" opacity" );
393- if (transition != null ) {
394- transition. completed. connect (() = > {
395- in_slot_animation = false ;
396- place_widgets (rect. width, rect. height, scale);
397- });
398- } else {
399- in_slot_animation = false ;
400- place_widgets (rect. width, rect. height, scale);
401- }
402389 };
403390
404391 if (gesture_tracker == null || ! with_gesture || ! wm. enable_animations) {
0 commit comments