[LyX/master] Attempt on #12066.

Pavel Sanda sanda at lyx.org
Wed Feb 3 21:08:01 UTC 2021


commit ded8c873f475146f76256d45c8fcbfdbfa75ce58
Author: Pavel Sanda <sanda at lyx.org>
Date:   Wed Feb 3 22:06:14 2021 +0100

    Attempt on #12066.
    
    Some lfuns are handled directly in GuiApplication while handling
    of menu hiding in fullscreen was done on the level of GuiView.
    
    We'll see if this code movement breaks in different scenarios,
    but quick grep suggested that the only other way to guiview
    dispatch is through drag&drop when menu isn't involved.
---
 src/frontends/qt/GuiApplication.cpp |    5 +++++
 src/frontends/qt/GuiView.cpp        |    6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 455dbed..8160e39 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2178,6 +2178,11 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 		break;
 	}
 
+	if (current_view_ && current_view_->isFullScreen()) {
+		if (current_view_->menuBar()->isVisible() && lyxrc.full_screen_menubar)
+			current_view_->menuBar()->hide();
+	}
+
 	if (cmd.origin() == FuncRequest::LYXSERVER)
 		updateCurrentView(cmd, dr);
 }
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 3ff1858..52dc6f9 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -4659,12 +4659,6 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 			break;
 	}
 
-	// Part of automatic menu appearance feature.
-	if (isFullScreen()) {
-		if (menuBar()->isVisible() && lyxrc.full_screen_menubar)
-			menuBar()->hide();
-	}
-
 	// Need to update bv because many LFUNs here might have destroyed it
 	bv = currentBufferView();
 


More information about the lyx-cvs mailing list