summaryrefslogtreecommitdiff
diff options
authorEleni Maria Stea <elenimaria.stea@canonical.com>2016-07-05 10:22:22 +0000
committerBileto Bot <ci-train-bot@canonical.com>2016-07-05 10:22:22 +0000
commit8913b1a2c84e6af1cf84191a2d75f88c64e6ca09 (patch)
tree768264775f35819a91bd061eb6e872b57bc700e1
parente2da8708a0f6d43d69da39bfd650339a801868de (diff)
parent55b34f7fba58528d2625bba13dcd1a6d0ed39c02 (diff)
speeds up the showdesktop plugin in lowgfx mode
(bzr r4142)
-rw-r--r--plugins/unityshell/src/UnityShowdesktopHandler.cpp7
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;