I don't think it's a good idea to show menubar belonging to another app.

svn path=/trunk/kdebase/kwin/; revision=165442
This commit is contained in:
Luboš Luňák 2002-07-07 18:54:20 +00:00
parent 2c7a013bc3
commit 3e236f2416

View file

@ -1414,16 +1414,7 @@ void Workspace::setActiveClient( Client* c )
if ( !menubar && !has_full_screen) if ( !menubar && !has_full_screen)
{ {
// Find the menubar of the desktop // Find the menubar of the desktop
if ( desktops.isEmpty() ) { if ( !desktops.isEmpty() ) {
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
if ( (*it)->isTopMenu() && (*it)->mainClient() == (*it) ) {
menubar = *it;
break;
}
}
}
else
{
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
if ( (*it)->isTopMenu() && (*it)->mainClient()->isDesktop() ) { if ( (*it)->isTopMenu() && (*it)->mainClient()->isDesktop() ) {
menubar = *it; 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 ) { if ( menubar ) {