if a transient has a main window that is on all desktops, make the transient too

svn path=/trunk/KDE/kdebase/workspace/; revision=1165451
This commit is contained in:
Luboš Luňák 2010-08-19 12:07:44 +00:00
parent 07603785a7
commit 2d01df9e04

View file

@ -165,6 +165,7 @@ bool Client::manage( Window w, bool isMapped )
{ {
ClientList mainclients = mainClients(); ClientList mainclients = mainClients();
bool on_current = false; bool on_current = false;
bool on_all = false;
Client* maincl = NULL; Client* maincl = NULL;
// This is slightly duplicated from Placement::placeOnMainWindow() // This is slightly duplicated from Placement::placeOnMainWindow()
for( ClientList::ConstIterator it = mainclients.constBegin(); for( ClientList::ConstIterator it = mainclients.constBegin();
@ -176,8 +177,12 @@ bool Client::manage( Window w, bool isMapped )
maincl = *it; maincl = *it;
if( (*it)->isOnCurrentDesktop() ) if( (*it)->isOnCurrentDesktop() )
on_current = true; on_current = true;
if( (*it)->isOnAllDesktops() )
on_all = true;
} }
if( on_current ) if( on_all )
desk = NET::OnAllDesktops;
else if( on_current )
desk = workspace()->currentDesktop(); desk = workspace()->currentDesktop();
else if( maincl != NULL ) else if( maincl != NULL )
desk = maincl->desktop(); desk = maincl->desktop();