From a670f6604cad48d2335fbe33de41c48a33e1156b Mon Sep 17 00:00:00 2001 From: Eleni Maria Stea Date: Wed, 11 Jan 2017 09:23:22 +0200 Subject: replaced the lowgfx unityshell plugin option with the lowgfx gsetting (bzr r4213.3.2) --- plugins/unityshell/src/unityshell.cpp | 34 +++++++++++----------------------- plugins/unityshell/unityshell_xml.in | 6 ------ 2 files changed, 11 insertions(+), 29 deletions(-) (limited to 'plugins') diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index beda277ca..91ef4fc7e 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -292,25 +292,22 @@ UnityScreen::UnityScreen(CompScreen* screen) } //In case of software rendering then enable lowgfx mode. - std::string renderer = ANSI_TO_TCHAR(NUX_REINTERPRET_CAST(const char *, glGetString(GL_RENDERER))); g_autoptr(GSettings) gs = g_settings_new("com.canonical.Unity"); - if (g_settings_get_boolean(gs, "lowgfx")) - unity_settings_.low_gfx = true; - else - unity_settings_.low_gfx = false; + bool enable_lowgfx = g_settings_get_boolean(gs, "lowgfx"); + std::string renderer = ANSI_TO_TCHAR(NUX_REINTERPRET_CAST(const char *, glGetString(GL_RENDERER))); if (renderer.find("Software Rasterizer") != std::string::npos || - renderer.find("Mesa X11") != std::string::npos || - renderer.find("llvmpipe") != std::string::npos || - renderer.find("softpipe") != std::string::npos || - (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) || - optionGetLowGraphicsMode() - ) - { + renderer.find("Mesa X11") != std::string::npos || + renderer.find("llvmpipe") != std::string::npos || + renderer.find("softpipe") != std::string::npos || + (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) || + enable_lowgfx + ) + { unity_settings_.low_gfx = true; - } + } - if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0) + if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0 && (enable_lowgfx == false)) { unity_settings_.low_gfx = false; } @@ -389,7 +386,6 @@ UnityScreen::UnityScreen(CompScreen* screen) optionSetAutohideAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetDashBlurExperimentalNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShortcutOverlayNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); - optionSetLowGraphicsModeNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2)); optionSetShowLauncherInitiate(boost::bind(&UnityScreen::showLauncherKeyInitiate, this, _1, _2, _3)); optionSetShowLauncherTerminate(boost::bind(&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3)); optionSetKeyboardFocusInitiate(boost::bind(&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3)); @@ -3742,14 +3738,6 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num) case UnityshellOptions::ShortcutOverlay: shortcut_controller_->SetEnabled(optionGetShortcutOverlay()); break; - case UnityshellOptions::LowGraphicsMode: - if (optionGetLowGraphicsMode()) - BackgroundEffectHelper::blur_type = BLUR_NONE; - else - BackgroundEffectHelper::blur_type = (unity::BlurType)optionGetDashBlurExperimental(); - - unity::Settings::Instance().low_gfx = optionGetLowGraphicsMode(); - break; case UnityshellOptions::DecayRate: launcher_options->edge_decay_rate = optionGetDecayRate() * 100; break; diff --git a/plugins/unityshell/unityshell_xml.in b/plugins/unityshell/unityshell_xml.in index 1820f27d2..9294c5b26 100644 --- a/plugins/unityshell/unityshell_xml.in +++ b/plugins/unityshell/unityshell_xml.in @@ -160,12 +160,6 @@ <_long>Enables possibility to display an overlay showing available mouse and keyboard shortcuts. true - - -- cgit v1.2.3