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
+ // Alt-P and Alt-M. Right now there is a hack in
+ // GuiWorkArea::processKeySym() that hides again the menubar for
+ // those cases.
if (ke->modifiers() & Qt::AltModifier && ke->key() != Qt::Key_Alt)
menuBar()->show();
return QMainWindow::event(e);
void GuiWorkArea::processKeySym(KeySymbol const & key, KeyModifier mod)
{
+ if (lyx_view_->isFullScreen() && lyx_view_->menuBar()->isVisible()) {
+ // FIXME HACK: we should not have to do this here. See related comment
+ // in GuiView::event() (QEvent::ShortcutOverride)
+ lyx_view_->menuBar()->hide();
+ }
+
// In order to avoid bad surprise in the middle of an operation,
// we better stop the blinking cursor...
// 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);
}