summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorChris Townsend <christopher.townsend@canonical.com>2013-05-08 17:54:48 -0400
committerChris Townsend <christopher.townsend@canonical.com>2013-05-08 17:54:48 -0400
commit68c6214271fd20d27657b479ebc35095690c2250 (patch)
tree447f3a6ffaf0186356c41f10dd1988694739cc17 /plugins
parentc41d0ec8b49689d57c2c7782bd68b91552d1102d (diff)
Re-work the fix for drawing the Launcher & Panel after minimizing a unredirected full screen window per Sam's comments. This way is much simpler and just takes into account if a window is minimized when adding it's geometry to the fullscreenRegion.
(bzr r3315.3.2)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 547edcd37..849b229da 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -1212,8 +1212,6 @@ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib,
unsigned int mask)
{
bool ret;
- bool isFullscreenMinimized = false,
- foundFullscreen = false;
/*
* Very important!
@@ -1241,29 +1239,7 @@ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib,
/* glPaintOutput is part of the opengl plugin, so we need the GLScreen base class. */
ret = gScreen->glPaintOutput(attrib, transform, region, output, mask);
- /*
- * Need to repaint the shell if we are minimizing a full screen window, otherwise
- * the Launcher and Panel is visually missing.
- * Also account for multiple full screen windows in the same workspace as well
- * as full screen windows in different workspaces.
- */
- for (auto window : fullscreen_windows_)
- {
- if (screen->vp() == window->defaultViewport())
- {
- if (window->minimized() && !foundFullscreen)
- {
- isFullscreenMinimized = true;
- }
- else
- {
- foundFullscreen = true;
- isFullscreenMinimized = false;
- }
- }
- }
-
- if (doShellRepaint && !force && fullscreenRegion.contains(*output) && !isFullscreenMinimized)
+ if (doShellRepaint && !force && fullscreenRegion.contains(*output))
doShellRepaint = false;
if (doShellRepaint)
@@ -2529,7 +2505,7 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib,
uScreen->windows_for_monitor_[monitor] = 1;
if (!(mask & nonOcclusionBits) &&
- (window->state() & CompWindowStateFullscreenMask) &&
+ (window->state() & CompWindowStateFullscreenMask && !window->minimized()) &&
uScreen->windows_for_monitor_[monitor] == 1)
// And I've been advised to test other things, but they don't work:
// && (attrib.opacity == OPAQUE)) <-- Doesn't work; Only set in glDraw