From fb5bf75e38c4622f8e38b3743ceaeb0507f4dc58 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Tue, 17 Jul 2012 17:52:08 +0200 Subject: [PATCH] Fix close button hiding behavior --- src/Widgets/WorkspaceThumb.vala | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Widgets/WorkspaceThumb.vala b/src/Widgets/WorkspaceThumb.vala index c2022cc3..daac1720 100644 --- a/src/Widgets/WorkspaceThumb.vala +++ b/src/Widgets/WorkspaceThumb.vala @@ -150,6 +150,10 @@ namespace Gala { if (indicator.opacity != 255) indicator.animate (AnimationMode.LINEAR, 100, opacity:0); + + //when draggin, the leave event isn't emitted + if (close_button.visible) + hide_close_button (); } void drop (Actor actor, float x, float y) { @@ -398,6 +402,12 @@ namespace Gala return true; } + internal void hide_close_button () + { + close_button.animate (AnimationMode.EASE_IN_QUAD, 400, scale_x : 0.0f, scale_y : 0.0f) + .completed.connect (() => close_button.visible = false ); + } + public override bool leave_event (CrossingEvent event) { if (contains (event.related)) @@ -414,8 +424,7 @@ namespace Gala if (workspace.index () == screen.n_workspaces - 1) wallpaper.animate (AnimationMode.EASE_OUT_QUAD, 400, opacity : 127); else - close_button.animate (AnimationMode.EASE_IN_QUAD, 400, scale_x : 0.0f, scale_y : 0.0f) - .completed.connect (() => close_button.visible = false ); + hide_close_button (); return false; }