Merge lp:~townsend/unity/fix-quicklist-spread into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3966
Proposed branch: lp:~townsend/unity/fix-quicklist-spread
Merge into: lp:unity
Diff against target: 30 lines (+9/-4)
1 file modified
launcher/LauncherIcon.cpp (+9/-4)
To merge this branch: bzr merge lp:~townsend/unity/fix-quicklist-spread
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+257300@code.launchpad.net

Commit message

Wait on Spread to be terminated before showing the Quicklist.

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 :

Right...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/LauncherIcon.cpp'
2--- launcher/LauncherIcon.cpp 2015-03-20 16:23:04 +0000
3+++ launcher/LauncherIcon.cpp 2015-04-23 20:19:52 +0000
4@@ -577,10 +577,6 @@
5 }
6
7 WindowManager& win_manager = WindowManager::Default();
8-
9- if (win_manager.IsScaleActive())
10- win_manager.TerminateScale();
11-
12 auto const& pos = GetTipPosition(monitor);
13
14 /* If the expo plugin is active, we need to wait it to be terminated, before
15@@ -593,6 +589,15 @@
16 conn->disconnect();
17 });
18 }
19+ else if (win_manager.IsScaleActive())
20+ {
21+ auto conn = std::make_shared<sigc::connection>();
22+ *conn = win_manager.terminate_spread.connect([this, conn, pos, restore_input_focus] {
23+ QuicklistManager::Default()->ShowQuicklist(_quicklist, pos.x, pos.y, restore_input_focus);
24+ conn->disconnect();
25+ });
26+ win_manager.TerminateScale();
27+ }
28 else
29 {
30 QuicklistManager::Default()->ShowQuicklist(_quicklist, pos.x, pos.y, restore_input_focus);