diff options
| author | Chris Townsend <christopher.townsend@canonical.com> | 2014-04-04 21:35:24 +0000 |
|---|---|---|
| committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-04-04 21:35:24 +0000 |
| commit | 36222843720f7aecf96b9e383b2ff9490e0d2762 (patch) | |
| tree | a70bf22d2dc1870c16d28297757f49a09aeb21ba | |
| parent | bb082dc26b0f43e1a4372a0ad54ce7edbc704194 (diff) | |
| parent | 243b2249fd12cf402b5aa0e549cb5eaa789ca8ab (diff) | |
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. Fixes: 1104236
(bzr r3762)
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index d91142d08..27b15d117 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -4286,12 +4286,35 @@ void UnityWindow::OnInitiateSpread() close_icon_state_ = decoration::WidgetState::NORMAL; middle_clicked_ = false; deco_win_->scaled = true; + + if (IsInShowdesktopMode()) + { + if (mShowdesktopHandler) + { + mShowdesktopHandler->FadeIn(); + } + } } void UnityWindow::OnTerminateSpread() { CleanupCachedTextures(); deco_win_->scaled = false; + + if (IsInShowdesktopMode()) + { + if (!(screen->activeWindow() == window->id())) + { + if (!mShowdesktopHandler) + mShowdesktopHandler.reset(new ShowdesktopHandler(static_cast <ShowdesktopHandlerWindowInterface *>(this), + static_cast <compiz::WindowInputRemoverLockAcquireInterface *>(this))); + mShowdesktopHandler->FadeOut(); + } + else + { + window->setShowDesktopMode (false); + } + } } void UnityWindow::paintInnerGlow(nux::Geometry glow_geo, GLMatrix const& matrix, GLWindowPaintAttrib const& attrib, unsigned mask) |
