From a6fa4609c2f67979cf8dbcf0bcfe2ee29b5c378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 4 Nov 2004 18:32:30 +0000 Subject: [PATCH] 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 --- manage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manage.cpp b/manage.cpp index 7faf6bb81b..a90fff9ada 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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();