From 3fa0dbdccbc8372f8c7e1b53e6fbd1c277f6ac6a Mon Sep 17 00:00:00 2001 From: Nikhil Marathe Date: Mon, 14 Jun 2010 15:17:17 +0000 Subject: [PATCH] Instead of relying on USPosition to avoid tiling Plasma windows, use the Plasma-desktop window class. This is a temporary workaround until Plasma exposes more classes and integrates better with KWin. Okayed by Lubos Lunak: http://reviewboard.kde.org/r/4255 Should fix 241051 without having any special settings for OpenOffice.org windows. BUG: 241051 svn path=/trunk/KDE/kdebase/workspace/; revision=1137887 --- tiling.cpp | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/tiling.cpp b/tiling.cpp index 97e921a484..4abce34b90 100644 --- a/tiling.cpp +++ b/tiling.cpp @@ -29,6 +29,8 @@ along with this program. If not, see . #include #include +#include +#include #include "lib/kdecoration.h" @@ -110,25 +112,17 @@ void Workspace::removeTile( Client *c ) bool Workspace::tileable( Client *c ) { - kDebug(1212) << c->caption(); + + kDebug(1212) << c->caption(); + KWindowInfo info = KWindowSystem::windowInfo( c->window(), -1U, NET::WM2WindowClass ); + kDebug(1212) << "WINDOW CLASS IS "<< info.windowClassClass(); + if( info.windowClassClass() == "Plasma-desktop" ) + { + return false; + } // TODO: if application specific settings // to ignore, put them here - // as suggested by Lucas Murray - // see Client::manage ( ~ line 270 of manage.cpp at time of writing ) - // This is useful to ignore plasma widget placing. - // According to the ICCCM if an application - // or user requests a certain geometry - // respect it - long msize; - XSizeHints xSizeHint; - XGetWMNormalHints(display(), c->window(), &xSizeHint, &msize); - if( xSizeHint.flags & PPosition || - xSizeHint.flags & USPosition ) { - kDebug(1212) << "Not tileable due to USPosition requirement"; - return false; - } - if( !c->isNormalWindow() ) { return false; @@ -140,6 +134,7 @@ bool Workspace::tileable( Client *c ) return false; } + kDebug() << "Tiling" << c; return true; }