summaryrefslogtreecommitdiff
diff options
-rw-r--r--plugins/unityshell/src/unityshell.cpp23
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)