summaryrefslogtreecommitdiff
path: root/shortcuts
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2015-11-26 01:06:37 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2015-11-26 01:06:37 +0100
commit4fc023f0c3b3da13ddff87bbcb25f0ab99a67b6f (patch)
tree01dd83067afc97f562b3c05f0d829b6c9f10fd4d /shortcuts
parent7d427ba8f59b67e3c12b478d8fdfcebe8d751d67 (diff)
Properly hide shortcut overlay window to avoid unnecessary redraws.
(bzr r4036.5.1)
Diffstat (limited to 'shortcuts')
-rw-r--r--shortcuts/ShortcutController.cpp7
1 files changed, 6 insertions, 1 deletions
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);
}