diff options
| author | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2017-01-31 14:20:28 +0200 | 
|---|---|---|
| committer | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2017-01-31 14:20:28 +0200 | 
| commit | 60e97497f7d4c17e5e7df9ed75459439323a03b2 (patch) | |
| tree | 2bedd399e6d649a742c336c94659c5061d555985 /unity-shared | |
| parent | de6daec2d89a34c83841f9219f5ed572c0aa1079 (diff) | |
made sure that low_gfx is always updated real-time
(bzr r4213.3.6)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/UnitySettings.cpp | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/unity-shared/UnitySettings.cpp b/unity-shared/UnitySettings.cpp index f591ebf6d..1c559faf8 100644 --- a/unity-shared/UnitySettings.cpp +++ b/unity-shared/UnitySettings.cpp @@ -118,6 +118,10 @@ public:  for (unsigned i = 0; i < monitors::MAX; ++i)  em_converters_.emplace_back(std::make_shared<EMConverter>()); + signals_.Add<void, GSettings*, const gchar*>(usettings_, "changed::" + LOWGFX, [this] (GSettings*, const gchar *) { + UpdateLowGfx(); + }); +  signals_.Add<void, GSettings*, const gchar*>(usettings_, "changed::" + FORM_FACTOR, [this] (GSettings*, const gchar*) {  CacheFormFactor();  }); @@ -182,6 +186,7 @@ public:  UScreen::GetDefault()->changed.connect(sigc::hide(sigc::hide(sigc::mem_fun(this, &Impl::UpdateDPI))));  // The order is important here, DPI is the last thing to be updated + UpdateLowGfx();  UpdateLimSetting();  UpdateGesturesSetting();  UpdateTextScaleFactor(); @@ -231,6 +236,11 @@ public:  cached_launcher_position_ = static_cast<LauncherPosition>(g_settings_get_enum(launcher_settings_, LAUNCHER_POSITION.c_str()));  } + void UpdateLowGfx() + { + parent_->low_gfx = GetLowGfx(); + } +  void UpdateLimSetting()  {  parent_->lim_movement_thresold = g_settings_get_uint(lim_settings_, CLICK_MOVEMENT_THRESHOLD.c_str()); @@ -285,7 +295,10 @@ public:  bool GetLowGfx() const  { - return g_settings_get_boolean(usettings_, LOWGFX.c_str()); + if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0) + return false; + + return g_settings_get_boolean(usettings_, LOWGFX.c_str());  }  int GetFontSize() const | 
