Ignore special windows for placement/desktop, breaks with standalone
menubar. svn path=/trunk/kdebase/kwin/; revision=279905
This commit is contained in:
parent
b41fc6bf49
commit
6dea573226
1 changed files with 9 additions and 2 deletions
11
manage.cpp
11
manage.cpp
|
@ -158,15 +158,22 @@ bool Client::manage( Window w, bool isMapped )
|
||||||
{
|
{
|
||||||
ClientList mainclients = mainClients();
|
ClientList mainclients = mainClients();
|
||||||
bool on_current = false;
|
bool on_current = false;
|
||||||
|
Client* maincl = NULL;
|
||||||
|
// this is slightly duplicated from Placement::placeOnMainWindow()
|
||||||
for( ClientList::ConstIterator it = mainclients.begin();
|
for( ClientList::ConstIterator it = mainclients.begin();
|
||||||
it != mainclients.end();
|
it != mainclients.end();
|
||||||
++it )
|
++it )
|
||||||
|
{
|
||||||
|
if( (*it)->isSpecialWindow() && !(*it)->isOverride())
|
||||||
|
continue; // don't consider toolbars etc when placing
|
||||||
|
maincl = *it;
|
||||||
if( (*it)->isOnCurrentDesktop())
|
if( (*it)->isOnCurrentDesktop())
|
||||||
on_current = true;
|
on_current = true;
|
||||||
|
}
|
||||||
if( on_current )
|
if( on_current )
|
||||||
desk = workspace()->currentDesktop();
|
desk = workspace()->currentDesktop();
|
||||||
else if( mainclients.count() > 0 )
|
else if( maincl != NULL )
|
||||||
desk = mainclients.first()->desktop();
|
desk = maincl->desktop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( desk == 0 ) // assume window wants to be visible on the current desktop
|
if ( desk == 0 ) // assume window wants to be visible on the current desktop
|
||||||
|
|
Loading…
Reference in a new issue