Reoder how the initial virtual desktop placement is considered.

For dialogs prefer placing together with mainwindow to data
from startup notification (happens with kio_uiserver dialogs).

svn path=/trunk/kdebase/kwin/; revision=360448
This commit is contained in:
Luboš Luňák 2004-11-04 18:32:30 +00:00
parent 8255bc2749
commit a6fa4609c2

View file

@ -137,17 +137,13 @@ bool Client::manage( Window w, bool isMapped )
setUserNoBorder( true );
// initial desktop placement
if ( info->desktop() )
desk = info->desktop(); // window had the initial desktop property!
else if( asn_valid && asn_data.desktop() != 0 )
desk = asn_data.desktop();
if ( session )
{
desk = session->desktop;
if( session->onAllDesktops )
desk = NET::OnAllDesktops;
}
else if ( desk == 0 )
else
{
// if this window is transient, ensure that it is opened on the
// same window as its parent. this is necessary when an application
@ -173,6 +169,10 @@ bool Client::manage( Window w, bool isMapped )
else if( maincl != NULL )
desk = maincl->desktop();
}
if ( info->desktop() )
desk = info->desktop(); // window had the initial desktop property, force it
if( desktop() == 0 && asn_valid && asn_data.desktop() != 0 )
desk = asn_data.desktop();
}
if ( desk == 0 ) // assume window wants to be visible on the current desktop
desk = workspace()->currentDesktop();