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
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2014-04-03 11:10:13 +0000
+++ plugins/unityshell/src/unityshell.cpp 2014-04-04 14:51:42 +0000
@@ -4286,12 +4286,35 @@
4286 close_icon_state_ = decoration::WidgetState::NORMAL;4286 close_icon_state_ = decoration::WidgetState::NORMAL;
4287 middle_clicked_ = false;4287 middle_clicked_ = false;
4288 deco_win_->scaled = true;4288 deco_win_->scaled = true;
4289
4290 if (IsInShowdesktopMode())
4291 {
4292 if (mShowdesktopHandler)
4293 {
4294 mShowdesktopHandler->FadeIn();
4295 }
4296 }
4289}4297}
42904298
4291void UnityWindow::OnTerminateSpread()4299void UnityWindow::OnTerminateSpread()
4292{4300{
4293 CleanupCachedTextures();4301 CleanupCachedTextures();
4294 deco_win_->scaled = false;4302 deco_win_->scaled = false;
4303
4304 if (IsInShowdesktopMode())
4305 {
4306 if (!(screen->activeWindow() == window->id()))
4307 {
4308 if (!mShowdesktopHandler)
4309 mShowdesktopHandler.reset(new ShowdesktopHandler(static_cast <ShowdesktopHandlerWindowInterface *>(this),
4310 static_cast <compiz::WindowInputRemoverLockAcquireInterface *>(this)));
4311 mShowdesktopHandler->FadeOut();
4312 }
4313 else
4314 {
4315 window->setShowDesktopMode (false);
4316 }
4317 }
4295}4318}
42964319
4297void UnityWindow::paintInnerGlow(nux::Geometry glow_geo, GLMatrix const& matrix, GLWindowPaintAttrib const& attrib, unsigned mask)4320void UnityWindow::paintInnerGlow(nux::Geometry glow_geo, GLMatrix const& matrix, GLWindowPaintAttrib const& attrib, unsigned mask)