summaryrefslogtreecommitdiff
path: root/plugins
diff options
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp17
-rw-r--r--plugins/unityshell/src/unityshell.h1
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;