Merge lp:~azzar1/unity/lp-1485559 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: 4004
Proposed branch: lp:~azzar1/unity/lp-1485559
Merge into: lp:unity
Prerequisite: lp:~azzar1/unity/lp-1485073
Diff against target: 36 lines (+8/-0)
2 files modified
panel/PanelMenuView.cpp (+7/-0)
panel/PanelMenuView.h (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1485559
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+268217@code.launchpad.net

This proposal supersedes a proposal from 2015-08-17.

Commit message

Make sure we update the maximized window when "show desktop"/"restore desktop".

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
Marco Trevisan (Treviño) (3v1n0) wrote :

Allright.

You might have even just set UpdateMaximizedWindow as callback, but it's fine anyway.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/PanelMenuView.cpp'
2--- panel/PanelMenuView.cpp 2015-04-20 18:42:25 +0000
3+++ panel/PanelMenuView.cpp 2015-08-17 11:45:41 +0000
4@@ -229,6 +229,7 @@
5 wm.initiate_expo.connect(sigc::mem_fun(this, &PanelMenuView::RefreshAndRedraw));
6 wm.terminate_expo.connect(sigc::mem_fun(this, &PanelMenuView::RefreshAndRedraw));
7 wm.screen_viewport_switch_ended.connect(sigc::mem_fun(this, &PanelMenuView::RefreshAndRedraw));
8+ wm.show_desktop_changed.connect(sigc::mem_fun(this, &PanelMenuView::OnShowDesktopChanged));
9 }
10
11 void PanelMenuView::SetupUBusManagerInterests()
12@@ -1239,6 +1240,12 @@
13 }
14 }
15
16+void PanelMenuView::OnShowDesktopChanged()
17+{
18+ UpdateMaximizedWindow();
19+}
20+
21+
22 bool PanelMenuView::UpdateActiveWindowPosition()
23 {
24 bool we_control_window = IsWindowUnderOurControl(active_window);
25
26=== modified file 'panel/PanelMenuView.h'
27--- panel/PanelMenuView.h 2015-04-20 17:58:31 +0000
28+++ panel/PanelMenuView.h 2015-08-17 11:45:41 +0000
29@@ -105,6 +105,7 @@
30 void OnWindowMaximized(Window xid);
31 void OnWindowRestored(Window xid);
32 void OnWindowMoved(Window xid);
33+ void OnShowDesktopChanged();
34
35 void OnMaximizedActivate(int x, int y);
36 void OnMaximizedDoubleClicked(int x, int y);