diff options
| author | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2012-10-17 11:08:05 +0000 |
|---|---|---|
| committer | Tarmac <> | 2012-10-17 11:08:05 +0000 |
| commit | c83c33d7e0fd3d8ba9e0c9f8b7e17e73d9181767 (patch) | |
| tree | efc6032b42b7f9c944763196226b956dc6f5e14c /plugins | |
| parent | 8a8fc72544e197888833df000db0f5255a9731dd (diff) | |
| parent | 9c952849f6d376d34813b7dd947ba9669e8044e1 (diff) | |
Keep the panel shadow attached to the panel at all times. Even under screen
transformations like the cube plugin. (LP: #1011120) Also fixes other panel shadow bugs (LP: #1061338) and (LP: #1061339). Fixes: https://bugs.launchpad.net/bugs/1011120, https://bugs.launchpad.net/bugs/1061338, https://bugs.launchpad.net/bugs/1061339. Approved by Sam Spilsbury. (bzr r2847)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 17 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 1 |
2 files changed, 14 insertions, 4 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 3bccc2011..000a826a2 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -589,10 +589,13 @@ void UnityScreen::paintPanelShadow(const CompRegion& clip) CompRegion redraw(clip); redraw &= shadowRect; + redraw -= panelShadowPainted; if (redraw.isEmpty()) return; + panelShadowPainted |= redraw; + // compiz doesn't use the same method of tracking monitors as our toolkit // we need to make sure we properly associate with the right monitor int current_monitor = -1; @@ -1328,7 +1331,7 @@ void UnityScreen::glPaintTransformedOutput(const GLScreenPaintAttrib& attrib, { allowWindowPaint = false; gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask); - + paintPanelShadow(region); } void UnityScreen::preparePaint(int ms) @@ -1342,6 +1345,7 @@ void UnityScreen::preparePaint(int ms) wi->HandleAnimations (ms); didShellRepaint = false; + panelShadowPainted = CompRegion(); firstWindowAboveShell = NULL; } @@ -2529,18 +2533,23 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, uScreen->paintDisplay(); } - if (window->type() == CompWindowTypeDesktopMask) + bool screen_transformed = (mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK); + + if (window->type() == CompWindowTypeDesktopMask && !screen_transformed) uScreen->setPanelShadowMatrix(matrix); Window active_window = screen->activeWindow(); - if (window->id() == active_window && window->type() != CompWindowTypeDesktopMask) + if (!screen_transformed && + window->id() == active_window && + window->type() != CompWindowTypeDesktopMask) { uScreen->paintPanelShadow(region); } bool ret = gWindow->glDraw(matrix, attrib, region, mask); - if ((active_window == 0 || active_window == window->id()) && + if (!screen_transformed && + (active_window == 0 || active_window == window->id()) && (window->type() == CompWindowTypeDesktopMask)) { uScreen->paintPanelShadow(region); diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 48e2d2f53..506888535 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -303,6 +303,7 @@ private: bool _key_nav_mode_requested; CompOutput* _last_output; + CompRegion panelShadowPainted; CompRegion nuxRegion; CompRegion fullscreenRegion; CompWindow* firstWindowAboveShell; |
