diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2015-12-11 12:45:59 +0000 |
|---|---|---|
| committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-12-11 12:45:59 +0000 |
| commit | 996216b5d3db51f034bd4e977bf028ce32bc9fd8 (patch) | |
| tree | 33c8e6d95a25e817c2a1cfb340a594495683f488 /shortcuts | |
| parent | 582044416c601b228c941ebb4cceb3c21ef1d2d9 (diff) | |
| parent | 4fc023f0c3b3da13ddff87bbcb25f0ab99a67b6f (diff) | |
Properly hide shortcut overlay window to avoid unnecessary redraws.
Approved by: PS Jenkins bot, Marco Trevisan (TreviƱo) (bzr r4051)
Diffstat (limited to 'shortcuts')
| -rw-r--r-- | shortcuts/ShortcutController.cpp | 7 |
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); } |
