Merge lp:~azzar1/unity/fix-shortcut-overlay-redrawing into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4051
Proposed branch: lp:~azzar1/unity/fix-shortcut-overlay-redrawing
Merge into: lp:unity
Diff against target: 30 lines (+6/-1)
1 file modified
shortcuts/ShortcutController.cpp (+6/-1)
To merge this branch: bzr merge lp:~azzar1/unity/fix-shortcut-overlay-redrawing
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+278661@code.launchpad.net

Commit message

Properly hide shortcut overlay window to avoid unnecessary redraws.

Description of the change

Properly hide shortcut overlay window to avoid unnecessary redraws.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shortcuts/ShortcutController.cpp'
2--- shortcuts/ShortcutController.cpp 2014-05-14 00:06:05 +0000
3+++ shortcuts/ShortcutController.cpp 2015-11-26 00:11:28 +0000
4@@ -53,6 +53,10 @@
5
6 WindowManager::Default().average_color.changed.connect(sigc::mem_fun(this, &Controller::OnBackgroundUpdate));
7 fade_animator_.updated.connect(sigc::mem_fun(this, &Controller::SetOpacity));
8+ fade_animator_.finished.connect([this] {
9+ if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
10+ view_window_->ShowWindow(false);
11+ });
12 modeller_->model_changed.connect(sigc::mem_fun(this, &Controller::OnModelUpdated));
13 }
14
15@@ -120,6 +124,7 @@
16 if (visible_)
17 {
18 view_->live_background = true;
19+ view_window_->ShowWindow(true);
20 animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD);
21 }
22
23@@ -171,7 +176,7 @@
24
25 main_layout_->AddView(view_.GetPointer());
26
27- view_window_->ShowWindow(true);
28+ view_window_->ShowWindow(false);
29 SetOpacity(0.0);
30 }
31