Merge lp:~mc-return/unity/unity.merge-fix1063249 into lp:unity

Proposed by MC Return
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2833
Proposed branch: lp:~mc-return/unity/unity.merge-fix1063249
Merge into: lp:unity
Diff against target: 34 lines (+15/-1)
2 files modified
manual-tests/WindowManagement.txt (+14/-0)
plugins/unityshell/src/UnityShowdesktopHandler.cpp (+1/-1)
To merge this branch: bzr merge lp:~mc-return/unity/unity.merge-fix1063249
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
jenkins continuous-integration Pending
Review via email: mp+129457@code.launchpad.net

Commit message

Opacity should be 0 if the state is invisible.
Added a manual "Show Desktop" test.

Description of the change

Please see https://bugs.launchpad.net/unity/+bug/1063249.

This fix has already been tested.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Awesome, confirmed working +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'manual-tests/WindowManagement.txt'
--- manual-tests/WindowManagement.txt 2012-07-25 08:38:07 +0000
+++ manual-tests/WindowManagement.txt 2012-10-12 16:51:19 +0000
@@ -68,3 +68,17 @@
68#. Tap F11 to leave full screen.68#. Tap F11 to leave full screen.
69#. Press Super+S twice to force a full screen redraw.69#. Press Super+S twice to force a full screen redraw.
7070
71
72Show Desktop fades windows smoothly
73------------------------------------
74Tests visual regressions to the show desktop/restore windows behavior.
75
76Setup:
77
78Action:
79#. Open several windows.
80#. Press Super+D to show the desktop.
81#. Press Super+D again to restore the previous state.
82
83Expected Result:
84 All open windows must fade out and then fade back in smoothly, without any popping or pulsing effect.
7185
=== modified file 'plugins/unityshell/src/UnityShowdesktopHandler.cpp'
--- plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-04-23 12:25:44 +0000
+++ plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-10-12 16:51:19 +0000
@@ -168,7 +168,7 @@
168168
169void ShowdesktopHandler::PaintOpacity (unsigned short &opacity)169void ShowdesktopHandler::PaintOpacity (unsigned short &opacity)
170{170{
171 if (progress_ == 1.0f || progress_ == 0.0f)171 if (progress_ == 0.0f)
172 opacity = std::numeric_limits <unsigned short>::max();172 opacity = std::numeric_limits <unsigned short>::max();
173 else173 else
174 opacity *= (1.0f - progress_);174 opacity *= (1.0f - progress_);