From 18c0ca2ff555539d1b98cf39c61f9e907520ac68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Mon, 30 Nov 2009 00:37:52 +0000 Subject: [PATCH] Ignore the frame overlap strut when compositing is disabled, and return a null rect in transparentRect() when the window is shaded. svn path=/trunk/KDE/kdebase/workspace/; revision=1056399 --- client.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 258ed6d8cb..ab2a1b9d45 100644 --- a/client.cpp +++ b/client.cpp @@ -446,7 +446,11 @@ void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect r.translate(-padding_left, -padding_top); NETStrut strut = info->frameOverlap(); - if (strut.left == -1 && strut.top == -1 && strut.right == -1 && strut.bottom == -1) + + // Ignore the overlap strut when compositing is disabled + if (!compositing()) + strut.left = strut.top = strut.right = strut.bottom = 0; + else if (strut.left == -1 && strut.top == -1 && strut.right == -1 && strut.bottom == -1) { top = QRect(r.x(), r.y(), r.width(), r.height() / 3); left = QRect(r.x(), r.y() + top.height(), width() / 2, r.height() / 3); @@ -593,8 +597,13 @@ void Client::resizeDecorationPixmaps() QRect Client::transparentRect() const { + if (isShade()) + return QRect(); + NETStrut strut = info->frameOverlap(); - if (strut.left == -1 && strut.top == -1 && strut.right == -1 && strut.bottom == -1) + if (!compositing()) // Ignore the strut when compositing is disabled + strut.left = strut.top = strut.right = strut.bottom = 0; + else if (strut.left == -1 && strut.top == -1 && strut.right == -1 && strut.bottom == -1) return QRect(); const QRect r = QRect(clientPos(), clientSize())