Merge lp:~townsend/unity/fix-lp1104236 into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3762
Proposed branch: lp:~townsend/unity/fix-lp1104236
Merge into: lp:unity
Diff against target: 39 lines (+23/-0)
1 file modified
plugins/unityshell/src/unityshell.cpp (+23/-0)
To merge this branch: bzr merge lp:~townsend/unity/fix-lp1104236
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+214267@code.launchpad.net

Commit message

Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen.

Description of the change

Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen.

This also needs https://code.launchpad.net/~townsend/compiz/fix-lp1104236 in Compiz to get a good fade out effect when leaving Spread.

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

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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 2014-04-03 11:10:13 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2014-04-04 14:51:42 +0000
4@@ -4286,12 +4286,35 @@
5 close_icon_state_ = decoration::WidgetState::NORMAL;
6 middle_clicked_ = false;
7 deco_win_->scaled = true;
8+
9+ if (IsInShowdesktopMode())
10+ {
11+ if (mShowdesktopHandler)
12+ {
13+ mShowdesktopHandler->FadeIn();
14+ }
15+ }
16 }
17
18 void UnityWindow::OnTerminateSpread()
19 {
20 CleanupCachedTextures();
21 deco_win_->scaled = false;
22+
23+ if (IsInShowdesktopMode())
24+ {
25+ if (!(screen->activeWindow() == window->id()))
26+ {
27+ if (!mShowdesktopHandler)
28+ mShowdesktopHandler.reset(new ShowdesktopHandler(static_cast <ShowdesktopHandlerWindowInterface *>(this),
29+ static_cast <compiz::WindowInputRemoverLockAcquireInterface *>(this)));
30+ mShowdesktopHandler->FadeOut();
31+ }
32+ else
33+ {
34+ window->setShowDesktopMode (false);
35+ }
36+ }
37 }
38
39 void UnityWindow::paintInnerGlow(nux::Geometry glow_geo, GLMatrix const& matrix, GLWindowPaintAttrib const& attrib, unsigned mask)