diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-17 12:53:40 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-07-17 12:53:40 +0200 |
| commit | bbac6998b230abb0b003f283cb8580c49123b8bc (patch) | |
| tree | 21b8c780e9ba688a64f4a7b51a15037d79b7ebce /plugins | |
| parent | d9eafe09833fa544611f53858eb1b5c08d402626 (diff) | |
UnityScreen: instead of changing low_gfx property, only set supports_3d on init
(bzr r4245.2.14)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 6fe50d315..20e644860 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -293,24 +293,18 @@ UnityScreen::UnityScreen(CompScreen* screen) } //In case of software rendering then enable lowgfx mode. + std::string lowgfx_env = glib::gchar_to_string(getenv("UNITY_LOW_GFX_MODE")); 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)) + atoi(lowgfx_env.c_str()) == 1) { - unity_settings_.low_gfx = true; + if (lowgfx_env.empty() || atoi(lowgfx_env.c_str()) != 0) + unity_settings_.supports_3d = false; } - if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0) - { - unity_settings_.low_gfx = false; - } - - if (unity_settings_.low_gfx()) - BackgroundEffectHelper::blur_type = BLUR_NONE; - Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) { BackgroundEffectHelper::blur_type = low_gfx ? BLUR_NONE : (unity::BlurType) optionGetDashBlurExperimental(); }, *this)); |
