summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-04 09:51:22 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-04 09:51:22 -0300
commit908d88658deb4190aae5c5f3e9fef25c9f7b7825 (patch)
treeff9d448ce6da93ae699013d315e79c12a65b159f /plugins
parent91b9ab1b239a1e6d58dbfd52f8a12d08bcabe3fa (diff)
Fixed windows decoration for maximized windows.
(bzr r2650.1.10)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 7c23f00c3..3d40eb65c 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -3790,7 +3790,14 @@ UnityWindow::scalePaintDecoration(const GLWindowPaintAttrib& attrib,
// Use "1" as margin to make sure to cover all originial decoration
const float width = (window->width() * pos.scale) + 2;
const float x = pos.x() + window->x() - 1;
- const float y = pos.y() + window->y() - SCALE_WINDOW_TITLE_SIZE;
+ float y = pos.y() + window->y();
+
+ // If window is decorated draw the decoration over the original
+ // otherwise draw inside the window
+ WindowManager *wm = WindowManager::Default();
+ if (wm->IsWindowDecorated(window->id()) && !wm->IsWindowMaximized(window->id()))
+ y -= SCALE_WINDOW_TITLE_SIZE;
+
const float iconX = x + CLOSE_ICON_SPACE;
const float iconY = y + ((SCALE_WINDOW_TITLE_SIZE - CLOSE_ICON_SIZE) / 2.0);