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
This commit is contained in:
parent
eab4dc6ed4
commit
18c0ca2ff5
1 changed files with 11 additions and 2 deletions
13
client.cpp
13
client.cpp
|
@ -446,7 +446,11 @@ void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect
|
||||||
r.translate(-padding_left, -padding_top);
|
r.translate(-padding_left, -padding_top);
|
||||||
|
|
||||||
NETStrut strut = info->frameOverlap();
|
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);
|
top = QRect(r.x(), r.y(), r.width(), r.height() / 3);
|
||||||
left = QRect(r.x(), r.y() + top.height(), width() / 2, 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
|
QRect Client::transparentRect() const
|
||||||
{
|
{
|
||||||
|
if (isShade())
|
||||||
|
return QRect();
|
||||||
|
|
||||||
NETStrut strut = info->frameOverlap();
|
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();
|
return QRect();
|
||||||
|
|
||||||
const QRect r = QRect(clientPos(), clientSize())
|
const QRect r = QRect(clientPos(), clientSize())
|
||||||
|
|
Loading…
Reference in a new issue