Bug 53642 - Menubar is always visible after coming back from fullscreen
Summary: Menubar is always visible after coming back from fullscreen
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Maksim Orlovich
URL:
Keywords:
: 110667 117490 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-30 10:09 UTC by Hasso Tepper
Modified: 2006-09-06 22:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed fix for menubar visibility restoration (1.06 KB, patch)
2006-08-13 21:19 UTC, Vinay S Shastry
Details
Uses new local variable (1.71 KB, patch)
2006-08-17 15:33 UTC, Vinay S Shastry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hasso Tepper 2003-01-30 10:09:16 UTC
Version:           3.1.0 (using KDE 3.1.9)
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.19

Disable menubar in konq, switch to fullscreen and back to normal - menubar is there.
Comment 1 Maksim Orlovich 2003-02-09 22:35:27 UTC
Indeed. It always shows it when exiting full-screen mode. I guess I'll queue this up for me to fix 
-- the only slightly tricky part is that the user may trigger the menubar while in the fullscreen 
mode, so it's not quite save-and-restore. 
Comment 2 illogic-al 2004-10-25 18:41:32 UTC
It seems this bug never got fixed (I just confirmed on 3.3.1) and it's taken on another bug which I think may be related. If not tell me and I'll create a bug report.
In addition to the "Menubar is always visible after coming back from fullscreen" bug, now the menubar disappears after leaving fullscreen and making new tab. 
Here are the steps to reproduce:
1. Open up Konqueror
2. Go to a website with links ( http://www.cplusplus.com/doc/tutorial/ for e.g. )
3. Go to fullscreen mode (F11)
4. Use the context menu to "Open in New Tab". DO NOT use [ctrl]+[shift]+[n] as that produces a different bug (yay)
5. Leave fullscreen mode (F11)
6. Now you should have at least two tabs open, and hence a Tab bar. Double Click on the Tab bar to open a new tab

You should see the menubar disappear. It will return however upon doing [ctrl]+[m] or going to fullscreen and then leaving again.
Comment 3 illogic-al 2004-10-25 18:43:39 UTC
oh. forgot to write my specs. 
Using KDE 3.3.1 and qt 3.3.3 both compiled from source.
Compiler is gcc 3.4. OS is mandrake linux 10.1.
Comment 4 illogic-al 2004-10-25 18:48:29 UTC
This bug was pointed out to me on IRC, while trying to confirm the one above. Again, it seems related somehow to this bug (at least in my mind).
Steps to reproduce:
1. Open up Konqueror  
2. Go to fullscreen mode (F11) 
3. Open a new tab using [ctrl]+[shift]+[n]

You will see the menubar show up in fullscreen mode which shouldn't happen.
Comment 5 Anne-Marie Mahfouf 2004-10-25 18:53:38 UTC
yes, menubar is gone, confirmed in cvs HEAD 25th October 2004
Comment 6 Florian Grässle 2005-02-09 20:24:55 UTC
a buggy behaviour that is supposedly related and leads to a totally mixed up wording and thus very irritating behaviour

1. open konqueror
2. go fullscreen (F11)
3. show menubar using [Ctrl] + [m]
4. exit fullscreen (F11)
5. settings -> "show menubar" should now say "hide menubar" since the menubar is actually present

checked with KDE 3.3.2 and KDE 3.4.0_beta1
Comment 7 Maksim Orlovich 2005-08-13 00:45:09 UTC
*** Bug 110667 has been marked as a duplicate of this bug. ***
Comment 8 Oliver Grimm 2006-07-08 12:17:11 UTC
still a bug in KDE 3.5.3
Comment 9 Vinay S Shastry 2006-08-13 21:19:08 UTC
Created attachment 17360 [details]
Proposed fix for menubar visibility restoration

Please try the above patch (for kde 3.5.4)
Comment 10 Andreas Kling 2006-08-17 12:40:04 UTC
The patch in #9 isn't quite correct. Since it uses a static local in slotUpdateFullScreen(), it will break with more than one KonqMainWindow.
Comment 11 Andreas Kling 2006-08-17 12:41:53 UTC
*** Bug 117490 has been marked as a duplicate of this bug. ***
Comment 12 Vinay S Shastry 2006-08-17 12:49:33 UTC
How does it break anything?
Comment 13 Andreas Kling 2006-08-17 14:08:41 UTC
"prevMenuBarVisible" should be unique per KonqMainWindow object, not common to all.
Comment 14 Vinay S Shastry 2006-08-17 15:33:34 UTC
Created attachment 17404 [details]
Uses new local variable

This will do ?
Comment 15 David Faure 2006-09-06 22:50:49 UTC
SVN commit 581612 by dfaure:

Apply patch for Bug 53642: Menubar is always visible after coming back from fullscreen
Thanks to <vinayshastry gmail com> for the patch!
BUG: 53642


 M  +9 -4      konq_mainwindow.cc  
 M  +2 -0      konq_mainwindow.h  


--- branches/KDE/3.5/kdebase/konqueror/konq_mainwindow.cc #581611:581612
@@ -170,6 +170,8 @@
 
   m_bViewModeToggled = false;
 
+  m_prevMenuBarVisible = true;
+
   m_pViewManager = new KonqViewManager( this );
 
   m_toggleViewGUIClient = new ToggleViewGUIClient( this );
@@ -3544,10 +3546,10 @@
         plugActionList( "fullscreen", lst );
     }
 
-
+    m_prevMenuBarVisible = menuBar()->isVisible();
     menuBar()->hide();
     m_paShowMenuBar->setChecked( false );
- 
+
     // Qt bug, the flags are lost. They know about it.
     // happens only with the hackish non-_NET_WM_STATE_FULLSCREEN way
     setWFlags( WDestructiveClose );
@@ -3571,8 +3573,11 @@
 #endif
     unplugActionList( "fullscreen" );
 
-    menuBar()->show(); // maybe we should store this setting instead of forcing it
-    m_paShowMenuBar->setChecked( true );
+    if (m_prevMenuBarVisible)
+    {
+        menuBar()->show();
+        m_paShowMenuBar->setChecked( true );
+    }
 
     // Qt bug, the flags aren't restored. They know about it.
     setWFlags( WType_TopLevel | WDestructiveClose );
--- branches/KDE/3.5/kdebase/konqueror/konq_mainwindow.h #581611:581612
@@ -749,6 +749,8 @@
 
   bool m_urlCompletionStarted;
 
+  bool m_prevMenuBarVisible;
+
   static bool s_preloaded;
   static KonqMainWindow* s_preloadedWindow;
   static int s_initialMemoryUsage;