From 6dea573226f1dac380ff1a64d00eabd69fbaad0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 15 Jan 2004 14:30:02 +0000 Subject: [PATCH] Ignore special windows for placement/desktop, breaks with standalone menubar. svn path=/trunk/kdebase/kwin/; revision=279905 --- manage.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/manage.cpp b/manage.cpp index cd61b1c9be..440f164b42 100644 --- a/manage.cpp +++ b/manage.cpp @@ -158,15 +158,22 @@ bool Client::manage( Window w, bool isMapped ) { ClientList mainclients = mainClients(); bool on_current = false; + Client* maincl = NULL; + // this is slightly duplicated from Placement::placeOnMainWindow() for( ClientList::ConstIterator it = mainclients.begin(); it != mainclients.end(); ++it ) + { + if( (*it)->isSpecialWindow() && !(*it)->isOverride()) + continue; // don't consider toolbars etc when placing + maincl = *it; if( (*it)->isOnCurrentDesktop()) on_current = true; + } if( on_current ) desk = workspace()->currentDesktop(); - else if( mainclients.count() > 0 ) - desk = mainclients.first()->desktop(); + else if( maincl != NULL ) + desk = maincl->desktop(); } } if ( desk == 0 ) // assume window wants to be visible on the current desktop