Bug 72113

Summary: When using Mac style menus the Application menu is lost when detach a tab in konqueror
Product: [Plasma] kwin Reporter: mhirsch
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description mhirsch 2004-01-08 05:48:41 UTC
Version:           unknown (using KDE 3.1.3)
Installed from:    Mandrake Linux Cooker i586 - Cooker
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-21mdk

I use the Mac-style menus on the top of the screen and tabbed browsing with konqueror.  If I detach a tab from konqueror, I get a new konqueror window, but the menu at the top of the screen is not the konq menu, but rather the default desktop menu.  As I click back and forth between the two konqueror windows the menu keeps changing.

This is not just a konqueror bug, I think, because the same thing happens with some other apps.  For instance, with kmail double click a mail message to get a window with the message in it.  The window with the message has the standard menu and kmail has the kmail menu.  Konsole behaves similarly when you detach a session--it loses the menu.

This happens for me both with the rpms for Mandrake 9.2 and for RedHat 9.
Comment 1 Lubos Lunak 2004-02-18 19:27:09 UTC
CVS commit by lunakl: 

Before using the global desktop topmenu, try to find any topmenu
belonging to the application.
CCMAIL: 72113-done@bugs.kde.org


  M +11 -0     workspace.cpp   1.459


--- kdebase/kwin/workspace.cpp  #1.458:1.459
@@ -547,4 +547,15 @@ void Workspace::updateCurrentTopMenu()
             menu_client = menu_client->transientFor();
             }
+        if( !menubar )
+            { // try to find any topmenu from the application (#72113)
+            for( ClientList::ConstIterator it = active_client->group()->members().begin();
+                 it != active_client->group()->members().end();
+                 ++it )
+                if( (*it)->isTopMenu())
+                    {
+                    menubar = *it;
+                    break;
+                    }
+            }
         }
     if( !menubar && !block_desktop_menubar && options->desktopTopMenu())