diff options
| author | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2016-07-04 14:35:19 +0300 |
|---|---|---|
| committer | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2016-07-04 14:35:19 +0300 |
| commit | 55b34f7fba58528d2625bba13dcd1a6d0ed39c02 (patch) | |
| tree | fb1bdc7a1772c8385ab7cb3ac9c8e0015e211c9e /plugins | |
| parent | 646d30f3ef85f9ce801dee8e0cd9f41ce56f9d51 (diff) | |
speed up show desktop in case of low gfx mode
(bzr r4135.1.1)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/UnityShowdesktopHandler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/unityshell/src/UnityShowdesktopHandler.cpp b/plugins/unityshell/src/UnityShowdesktopHandler.cpp index 1f5bc2038..d79200e0f 100644 --- a/plugins/unityshell/src/UnityShowdesktopHandler.cpp +++ b/plugins/unityshell/src/UnityShowdesktopHandler.cpp @@ -21,6 +21,7 @@ #include <glib.h> #include "UnityShowdesktopHandler.h" +#include "unity-shared/UnitySettings.h" namespace unity { @@ -99,7 +100,7 @@ void ShowdesktopHandler::FadeOut() return; state_ = ShowdesktopHandler::StateFadeOut; - progress_ = 0.0f; + progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : 0.0f; was_hidden_ = showdesktop_handler_window_interface_->Hidden(); @@ -143,7 +144,7 @@ ShowdesktopHandlerWindowInterface::PostPaintAction ShowdesktopHandler::Animate ( if (state_ == ShowdesktopHandler::StateFadeOut) { - progress_ += inc; + progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : progress_ + inc; if (progress_ >= 1.0f) { progress_ = 1.0f; @@ -152,7 +153,7 @@ ShowdesktopHandlerWindowInterface::PostPaintAction ShowdesktopHandler::Animate ( } else if (state_ == StateFadeIn) { - progress_ -= inc; + progress_ = unity::Settings::Instance().GetLowGfxMode() ? 0.0f : progress_ - inc; if (progress_ <= 0.0f) { progress_ = 0.0f; |
