From 3e236f2416813ee34c96501934da12f5fae5e39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 7 Jul 2002 18:54:20 +0000 Subject: [PATCH] I don't think it's a good idea to show menubar belonging to another app. svn path=/trunk/kdebase/kwin/; revision=165442 --- workspace.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 5337e6f778..947c70709f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1414,16 +1414,7 @@ void Workspace::setActiveClient( Client* c ) if ( !menubar && !has_full_screen) { // Find the menubar of the desktop - if ( desktops.isEmpty() ) { - for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { - if ( (*it)->isTopMenu() && (*it)->mainClient() == (*it) ) { - menubar = *it; - break; - } - } - } - else - { + if ( !desktops.isEmpty() ) { for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { if ( (*it)->isTopMenu() && (*it)->mainClient()->isDesktop() ) { menubar = *it; @@ -1431,6 +1422,19 @@ void Workspace::setActiveClient( Client* c ) } } } +#if 0 // I don't like this - why to show a menubar belonging to another application? + // either show the app's menubar, or the desktop's one, otherwise none at all + else + { + for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { + if ( (*it)->isTopMenu() && (*it)->mainClient() == (*it) + && (*it)->isOnDesktop( currentDesktop())) { + menubar = *it; + break; + } + } + } +#endif } if ( menubar ) {