]> git.lyx.org Git - features.git/commitdiff
- Don't popup the menubar if only Alt is pressed.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 09:42:28 +0000 (09:42 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 15 May 2008 09:42:28 +0000 (09:42 +0000)
- add a FIXME wrt LyX own shortcuts using Alt.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24786 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 3c4b710e170af400ae4286d4889311aa4ff6d2a6..c6312ea4b8177a6b7e40968f7ede3f6472c81026 100644 (file)
@@ -641,15 +641,20 @@ bool GuiView::event(QEvent * e)
        }
 
        case QEvent::ShortcutOverride: {
-               QKeyEvent * ke = static_cast<QKeyEvent*>(e);
 
-               if (ke->modifiers() & Qt::AltModifier && isFullScreen()
-                       && menuBar()->isHidden()) {
-                               menuBar()->show();
+               if (isFullScreen() && menuBar()->isHidden()) {
+                       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)
+                               return QMainWindow::event(e);                   
+                       menuBar()->show();
                        // Continue with even.
                        return QMainWindow::event(e);
                }
 
+               QKeyEvent * ke = static_cast<QKeyEvent*>(e);
                if (d.current_work_area_)
                        // Nothing special to do.
                        return QMainWindow::event(e);