Merge lp://qastaging/~smspillaz/unity/unity.fix_877778 into lp://qastaging/unity

Proposed by Sam Spilsbury
Status: Merged
Approved by: Andrea Cimitan
Approved revision: no longer in the source branch.
Merged at revision: 2245
Proposed branch: lp://qastaging/~smspillaz/unity/unity.fix_877778
Merge into: lp://qastaging/unity
Diff against target: 1721 lines (+1167/-284)
8 files modified
plugins/unityshell/src/UnityShowdesktopHandler.cpp (+215/-0)
plugins/unityshell/src/UnityShowdesktopHandler.h (+158/-0)
plugins/unityshell/src/inputremover.cpp (+7/-3)
plugins/unityshell/src/inputremover.h (+27/-5)
plugins/unityshell/src/unityshell.cpp (+180/-228)
plugins/unityshell/src/unityshell.h (+37/-47)
tests/CMakeLists.txt (+4/-1)
tests/test_showdesktop_handler.cpp (+539/-0)
To merge this branch: bzr merge lp://qastaging/~smspillaz/unity/unity.fix_877778
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Gord Allott Pending
Review via email: mp+101065@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-04-06.

Commit message

Fixes LP #877778 - Introduces tests for UnityShowdesktopHandler

Description of the change

Fixes LP #877778 - Introduces tests for UnityShowdesktopHandler

== Problem ==

See LP #877778 - in fact, Show Desktop mode was completely broken, but the bug there is mainly about the fact that showdesktoped windows would be invisible in the spread. That's now fixed

== Solution ==

Fix UnityShowdesktopHandler brokenness, namely the animation going in the wrong direction, damage being applied at the wrong time, handlers not being removed when they should be. Also use PAINT_WINDOW_NO_CORE_INSTANCE_MASK when the window is fully transparent and set the opacity to MAXINT (since the scale plugin uses this to bypass the no paint mask)

== Test Coverage ==

Split UnityShowdesktopHandler out into a separate file, created UnityShowdesktopHandlerWindowInterface, UnityWindow inmplements this, test coverage created in test_showdesktop_handler.cpp using Google Mock and Google Test. Also see AP tests.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote : Posted in a previous version of this proposal

Great stuff, but needs to conform to our code style :) namely FooBar() methods and _foo instead of mFoo, quick sed should fix it

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

On Wed 28 Mar 2012 21:47:21 NZDT, Gord Allott wrote:
> Review: Needs Fixing
>
> Great stuff, but needs to conform to our code style :) namely FooBar() methods and _foo instead of mFoo, quick sed should fix it

s/_foo/foo_/

Revision history for this message
Omer Akram (om26er) wrote : Posted in a previous version of this proposal

has conflicts.

Revision history for this message
Unity Merger (unity-merger) wrote : Posted in a previous version of this proposal

No commit message specified.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

A few style things:

If you are in namespace unity, you should prefix your classes with Unity.

also

s/ ()/()/g

The tests shouldn't be calling the virtual methods. It should be dealing only with the interface methods.

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

> A few style things:
>
> If you are in namespace unity, you should prefix your classes with Unity.

s/should/should not/

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Style pedantry fixed.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

> The tests shouldn't be calling the virtual methods. It should be dealing only with the interface methods.

As far as I can tell the tests are not calling virtual methods directly (in fact, they can't doing so would raise a compile error ...)

The ON_CALL and EXPECT_CALL macros however do need to be on the virtual methods, because that's what they are mocking.

Revision history for this message
Tim Penhey (thumper) wrote : Posted in a previous version of this proposal

When testing, entering show desktop, then out again (using Ctrl-Alt-D twice), the title bars of non-maximised windows aren't accepting the mouse, and clicks through. Focusing the window using alt left mouse to move it a bit fixed it.

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote :

This is fine now. We can fix the style later :)

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.