Check if the decoration supports the frame overlap strut in

Client::transparentRect() and Client::layoutDecorationRects().

svn path=/trunk/KDE/kdebase/workspace/; revision=1063057
icc-effect-5.14.5
Fredrik Höglund 2009-12-16 20:51:54 +00:00
parent 391f4a3e23
commit 586f4e9010
2 changed files with 9 additions and 2 deletions

View File

@ -448,7 +448,7 @@ void Client::layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect
NETStrut strut = info->frameOverlap();
// Ignore the overlap strut when compositing is disabled
if (!compositing())
if (!compositing() || !Workspace::self()->decorationSupportsFrameOverlap())
strut.left = strut.top = strut.right = strut.bottom = 0;
else if (strut.left == -1 && strut.top == -1 && strut.right == -1 && strut.bottom == -1)
{
@ -601,7 +601,8 @@ QRect Client::transparentRect() const
return QRect();
NETStrut strut = info->frameOverlap();
if (!compositing()) // Ignore the strut when compositing is disabled
// Ignore the strut when compositing is disabled or the decoration doesn't support it
if (!compositing() || !Workspace::self()->decorationSupportsFrameOverlap())
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();

View File

@ -383,6 +383,7 @@ class Workspace : public QObject, public KDecorationDefines
bool hasDecorationShadows() const;
bool decorationHasAlpha() const;
bool decorationSupportsClientGrouping() const; // Returns true if the decoration supports tabs.
bool decorationSupportsFrameOverlap() const;
// D-Bus interface
void cascadeDesktop();
@ -1257,6 +1258,11 @@ inline bool Workspace::decorationSupportsClientGrouping() const
return mgr->factory()->supports( AbilityClientGrouping );
}
inline bool Workspace::decorationSupportsFrameOverlap() const
{
return mgr->factory()->supports( AbilityExtendIntoClientArea );
}
inline void Workspace::addClientGroup( ClientGroup* group )
{
clientGroups.append( group );