158
158
public void close (bool do_animate = true)
160
160
unowned Meta.Rectangle rect = window.get_outer_rect ();
162
162
//FIXME need to subtract 10 here to remove jump for most windows, but adds jump for maximized ones
163
163
float delta = window.maximized_horizontally || window.maximized_vertically ? 0 : 10;
165
165
float dest_x = rect.x - delta;
166
166
float dest_y = rect.y - delta;
168
168
//stop all running animations
170
170
icon.detach_animation ();
171
171
close_button.detach_animation ();
173
173
bool dont_show = window.minimized || window.get_workspace () != window.get_screen ().get_active_workspace ();
174
174
do_animate = do_animate && !dont_show;
177
177
icon.animate (AnimationMode.EASE_IN_CUBIC, 100, scale_x:0.0f, scale_y:0.0f);
178
178
close_button.animate (AnimationMode.EASE_IN_QUAD, 200, scale_x : 0.0f, scale_y : 0.0f);
180
180
animate (AnimationMode.EASE_IN_OUT_CUBIC, 300, scale_x:1.0f, scale_y:1.0f, x:dest_x, y:dest_y).completed.connect (() => {