]> git.lyx.org Git - features.git/commitdiff
Restoring autohiding and showing of menubar upon Pavel's request.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 11:02:23 +0000 (11:02 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 11:02:23 +0000 (11:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24788 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 10a7a57a969fda6198cddec29228b565279bea6e..6a682cfc660608b22ad962a7b6b9242f88b6b0f4 100644 (file)
@@ -663,9 +663,15 @@ bool GuiView::event(QEvent * e)
                        if (!(ke->modifiers() & Qt::AltModifier)
                                || ke->key() == Qt::Key_Alt)
                                return QMainWindow::event(e);                   
-                       static_cast<MenuBar *>(menuBar())->keyPressEvent(ke);
+                       MenuBar * menu_bar = static_cast<MenuBar *>(menuBar());
+                       menu_bar->keyPressEvent(ke);
+                       menu_bar->show();                       
                        if (ke->isAccepted())
                                return true;
+                       // Showing and hiding the menubar has the potential to create a bad
+                       // flickering due to the window resizing. On Windows Vista, this flicker
+                       // is not visible at all.
+                       menu_bar->hide();                       
                        // Otherwise continue with even.
                        return QMainWindow::event(e);
                }
@@ -1937,6 +1943,13 @@ bool GuiView::dispatch(FuncRequest const & cmd)
                        break;
        }
 
+       if (isFullScreen()) {
+               if (menuBar()->isVisible())
+                       menuBar()->hide();
+               if (statusBar()->isVisible())
+                       statusBar()->hide();
+       }
+
        return dispatched;
 }