Merge lp:~vanvugt/unity/fix-1089779 into lp:unity

Proposed by Daniel van Vugt
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2979
Proposed branch: lp:~vanvugt/unity/fix-1089779
Merge into: lp:unity
Diff against target: 24 lines (+2/-2)
2 files modified
plugins/unityshell/src/unityshell.cpp (+1/-1)
plugins/unityshell/src/unityshell.h (+1/-1)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-1089779
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot continuous-integration Pending
Tim Penhey Pending
Unity Team Pending
Review via email: mp+139618@code.launchpad.net

Commit message

Update to the new CompWindow API where CompWindow::minimized() is const.
This change happened recently in lp:compiz r3517. Not updating
UnityWindow::minimized was causing it to be masked and no longer treated
as a virtual method. This means Compiz would never call the UnityWindow
version and would think that windows are never minimized (so don't need
restoring).
(LP: #1089779)

Description of the change

Note 1: In Compiz we use clang to detect masked method problems like this. Please consider compiling with clang occasionally to detect such pedantic problems (cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++).

Note 2: I don't think UnityWindow::[un]minimize[d]() are a good idea. They have caused nothing but bugs and should be removed IMHO.

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

The change looks good but when I minimize a window the area that was behind it is still input-insensitive.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah that must be a different bug then.

Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

This bug symptom seems like it could use a test.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-12-13 00:51:04 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-12-13 07:02:23 +0000
4@@ -2639,7 +2639,7 @@
5 }
6
7 bool
8-UnityWindow::minimized ()
9+UnityWindow::minimized () const
10 {
11 return mMinimizeHandler.get () != nullptr;
12 }
13
14=== modified file 'plugins/unityshell/src/unityshell.h'
15--- plugins/unityshell/src/unityshell.h 2012-11-12 17:27:48 +0000
16+++ plugins/unityshell/src/unityshell.h 2012-12-13 07:02:23 +0000
17@@ -369,7 +369,7 @@
18
19 void minimize();
20 void unminimize();
21- bool minimized();
22+ bool minimized() const;
23 bool focus();
24 void activate();
25