]> git.lyx.org Git - features.git/commitdiff
add a hack to autohide the menubar in fullscreen mode for LyX specific shortcuts...
authorAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 23:55:00 +0000 (23:55 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 23:55:00 +0000 (23:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24795 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp

index eae6bf135768e69ddff38d02166c55121e9c33db..79f80908c2825c82580a60e8daebf0bc237ae28f 100644 (file)
@@ -646,7 +646,7 @@ bool GuiView::event(QEvent * e)
                        QKeyEvent * ke = static_cast<QKeyEvent*>(e);
                        // FIXME: we should also try to detect special LyX shortcut such as
                        // Alt-P and Alt-M
-                       if (ke->modifiers() & Qt::AltModifier || ke->key() == Qt::Key_Alt)
+                       if (ke->modifiers() & Qt::AltModifier && ke->key() != Qt::Key_Alt)
                                menuBar()->show();
                        return QMainWindow::event(e);
                }
index e4ca81fc1687c8724eb92e8741a742d43edd7ca8..2525acd67916b9d1b0c886f2f6776ec78649a0d6 100644 (file)
@@ -411,6 +411,12 @@ void GuiWorkArea::processKeySym(KeySymbol const & key, KeyModifier mod)
        // the cursor gets restarted in GuiView::restartCursor()
        stopBlinkingCursor();
 
+       if (lyx_view_->isFullScreen() && lyx_view_->menuBar()->isVisible()) {
+               // FIXME: we should not have to do this here. See related comment in
+               // GuiView::event().
+               lyx_view_->menuBar()->hide();
+       }
+
        theLyXFunc().setLyXView(lyx_view_);
        theLyXFunc().processKeySym(key, mod);
 }