diff options
| author | Chris Townsend <christopher.townsend@canonical.com> | 2013-08-07 13:27:56 +0000 |
|---|---|---|
| committer | Tarmac <> | 2013-08-07 13:27:56 +0000 |
| commit | e3e701b6545249d5e1ee1127f821b3d2a49c5aab (patch) | |
| tree | 8b3de88c56c0ce10ea79d33203225e6205486045 /plugins/unityshell | |
| parent | eedef545cf5f470880ace021dbf303661030ce4a (diff) | |
| parent | 0dcb5c8b6413b1b5270c4b576c9ef014c6f720e1 (diff) | |
Fix yet another regression in revno. 3381 where the Panel shadow is not drawn when in Show Desktop mode by using PluginAdapter::IsWindowOnTop() instead of the new GetTopVisibleWindow(). Remove GetTopVisibleWindow() to get rid of code duplication. Fixes: https://bugs.launchpad.net/bugs/1203097.
Approved by PS Jenkins bot, Marco Trevisan (TreviƱo), Brandon Schaefer. (bzr r3454)
Diffstat (limited to 'plugins/unityshell')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 29 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 2 |
2 files changed, 2 insertions, 29 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 846e8ec93..cdf254c46 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -971,25 +971,6 @@ bool UnityScreen::DoesPointIntersectUnityGeos(nux::Point const& pt) return false; } -CompWindow * GetTopVisibleWindow() -{ - CompWindow *top_visible_window = NULL; - - for (CompWindow *w : screen->windows ()) - { - if (w->isViewable() && - !w->minimized() && - !w->resName().empty() && - (w->resName() != "unity-panel-service") && - (w->resName() != "notify-osd")) - { - top_visible_window = w; - } - } - - return top_visible_window; -} - void UnityWindow::enterShowDesktop () { if (!mShowdesktopHandler) @@ -2640,17 +2621,13 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, { Window active_window = screen->activeWindow(); - CompWindow *top_visible_window; - if (G_UNLIKELY(window->type() == CompWindowTypeDesktopMask)) { uScreen->setPanelShadowMatrix(matrix); if (active_window == 0 || active_window == window->id()) { - top_visible_window = GetTopVisibleWindow(); - - if (top_visible_window && (window->id() == top_visible_window->id())) + if (PluginAdapter::Default().IsWindowOnTop(window->id())) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; } @@ -2680,9 +2657,7 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, { if (uScreen->is_desktop_active_) { - top_visible_window = GetTopVisibleWindow(); - - if (top_visible_window && (window->id() == top_visible_window->id())) + if (PluginAdapter::Default().IsWindowOnTop(window->id())) { draw_panel_shadow = DrawPanelShadow::OVER_WINDOW; uScreen->panelShadowPainted = CompRegion(); diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 7684ae4ca..6725c5df8 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -251,8 +251,6 @@ private: void UpdateCloseWindowKey(CompAction::KeyBinding const&); - CompWindow * GetTopVisibleWindow(); - std::unique_ptr<na::TickSource> tick_source_; std::unique_ptr<na::AnimationController> animation_controller_; |
