From 4fc023f0c3b3da13ddff87bbcb25f0ab99a67b6f Mon Sep 17 00:00:00 2001 From: Andrea Azzarone Date: Thu, 26 Nov 2015 01:06:37 +0100 Subject: Properly hide shortcut overlay window to avoid unnecessary redraws. (bzr r4036.5.1) --- shortcuts/ShortcutController.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shortcuts') diff --git a/shortcuts/ShortcutController.cpp b/shortcuts/ShortcutController.cpp index 4101090e8..2ca388af7 100644 --- a/shortcuts/ShortcutController.cpp +++ b/shortcuts/ShortcutController.cpp @@ -53,6 +53,10 @@ Controller::Controller(BaseWindowRaiser::Ptr const& base_window_raiser, WindowManager::Default().average_color.changed.connect(sigc::mem_fun(this, &Controller::OnBackgroundUpdate)); fade_animator_.updated.connect(sigc::mem_fun(this, &Controller::SetOpacity)); + fade_animator_.finished.connect([this] { + if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD) + view_window_->ShowWindow(false); + }); modeller_->model_changed.connect(sigc::mem_fun(this, &Controller::OnModelUpdated)); } @@ -120,6 +124,7 @@ bool Controller::OnShowTimer() if (visible_) { view_->live_background = true; + view_window_->ShowWindow(true); animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD); } @@ -171,7 +176,7 @@ void Controller::ConstructView() main_layout_->AddView(view_.GetPointer()); - view_window_->ShowWindow(true); + view_window_->ShowWindow(false); SetOpacity(0.0); } -- cgit v1.2.3