diff options
| author | Jay Taoko <jay.taoko@canonical.com> | 2012-09-17 17:35:03 +0200 |
|---|---|---|
| committer | Jay Taoko <jay.taoko@canonical.com> | 2012-09-17 17:35:03 +0200 |
| commit | a5d0c25c85288f107549a262241a0895ab536f46 (patch) | |
| tree | 500b10bf410e8268622788cb3a7effa24a8b3a45 /plugins | |
| parent | a1845bb0035a1c3f97c2721240c5e0c7714297ad (diff) | |
* Fixing background color tint. W.I.P.
(bzr r2696.3.4)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 12 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index f7f9139db..704b8f2d0 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -126,6 +126,7 @@ UnityScreen::UnityScreen(CompScreen* screen) , allowWindowPaint(false) , _key_nav_mode_requested(false) , _last_output(nullptr) + , _bghash(NULL) , grab_index_ (0) , painting_tray_ (false) , last_scroll_event_(0) @@ -241,6 +242,8 @@ UnityScreen::UnityScreen(CompScreen* screen) wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::onRedrawRequested)); + _bghash = new BGHash(); + unity_a11y_init(wt.get()); /* i18n init */ @@ -387,6 +390,7 @@ UnityScreen::~UnityScreen() unity_a11y_finalize(); ::unity::ui::IconRenderer::DestroyTextures(); QuicklistManager::Destroy(); + delete _bghash; reset_glib_logging(); } @@ -1226,7 +1230,7 @@ void UnityScreen::preparePaint(int ms) // Emit the current time throught the tick_source. This moves any running // animations along their path. - //tick_source_.tick(g_get_monotonic_time()); + // tick_source_.tick(g_get_monotonic_time()); for (ShowdesktopHandlerWindowInterface *wi : ShowdesktopHandler::animating_windows) wi->HandleAnimations (ms); @@ -1522,7 +1526,8 @@ void UnityScreen::handleEvent(XEvent* event) if (event->xproperty.window == GDK_ROOT_WINDOW() && event->xproperty.atom == gdk_x11_get_xatom_by_name("_GNOME_BACKGROUND_REPRESENTATIVE_COLORS")) { - _bghash.RefreshColor(); + if (_bghash) + _bghash->RefreshColor(); } break; default: @@ -2733,7 +2738,8 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num) override_color.red = override_color.red / override_color.alpha; override_color.green = override_color.green / override_color.alpha; override_color.blue = override_color.blue / override_color.alpha; - _bghash.OverrideColor(override_color); + if (_bghash) + _bghash->OverrideColor(override_color); break; } case UnityshellOptions::LauncherHideMode: diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 9699b92db..c28d92dc6 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -308,7 +308,7 @@ private: nux::Property<nux::Geometry> primary_monitor_; - BGHash _bghash; + BGHash* _bghash; ::GLFramebufferObject *oldFbo; |
