Merge lp:~3v1n0/unity/indicator-prelight-fix into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 4043
Proposed branch: lp:~3v1n0/unity/indicator-prelight-fix
Merge into: lp:unity
Diff against target: 66 lines (+24/-25)
1 file modified
panel/PanelIndicatorEntryView.cpp (+24/-25)
To merge this branch: bzr merge lp:~3v1n0/unity/indicator-prelight-fix
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+276778@code.launchpad.net

Commit message

PanelIndicatorEntryView: Activate menus on click, by drawing them as active

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/PanelIndicatorEntryView.cpp'
2--- panel/PanelIndicatorEntryView.cpp 2015-10-05 16:52:24 +0000
3+++ panel/PanelIndicatorEntryView.cpp 2015-11-05 15:59:06 +0000
4@@ -98,29 +98,6 @@
5
6 void PanelIndicatorEntryView::ShowMenu(int button)
7 {
8- WindowManager& wm = WindowManager::Default();
9-
10- if (wm.IsExpoActive())
11- {
12- // Delay the activation until expo is closed
13- auto conn = std::make_shared<connection::Wrapper>();
14- *conn = wm.terminate_expo.connect([this, conn, button] {
15- ShowMenu(button);
16- (*conn)->disconnect();
17- });
18-
19- wm.TerminateExpo();
20- return;
21- }
22-
23- if (wm.IsScaleActive())
24- {
25- if (type_ == MENU)
26- return;
27-
28- wm.TerminateScale();
29- }
30-
31 auto const& abs_geo = GetAbsoluteGeometry();
32 proxy_->ShowMenu(abs_geo.x, abs_geo.y + abs_geo.height, button);
33 }
34@@ -142,8 +119,30 @@
35 }
36 else
37 {
38- ShowMenu(button);
39- Refresh();
40+ WindowManager& wm = WindowManager::Default();
41+
42+ if (wm.IsExpoActive())
43+ {
44+ // Delay the activation until expo is closed
45+ auto conn = std::make_shared<connection::Wrapper>();
46+ *conn = wm.terminate_expo.connect([this, conn, button] {
47+ Activate(button);
48+ (*conn)->disconnect();
49+ });
50+
51+ wm.TerminateExpo();
52+ return;
53+ }
54+
55+ if (wm.IsScaleActive())
56+ {
57+ if (type_ == MENU)
58+ return;
59+
60+ wm.TerminateScale();
61+ }
62+
63+ Activate(button);
64 }
65 }
66 }