From 20329514c528cce5dccd64939d29039e57b3deaf Mon Sep 17 00:00:00 2001 From: MrBlock <65095293+kzootech@users.noreply.github.com> Date: Mon, 12 Dec 2022 06:44:36 -0500 Subject: [PATCH] Fix bug #7563 where menus and tooltips are not visible in fullscreen mode on windows systems. (#8027) * Fix bug where menus and tooltips are not visible in fullscreen mode on windows systems. --- src/Gui/MainWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 6eb4a37cd8..53862b8656 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -53,6 +53,10 @@ # include #endif +#if defined(Q_OS_WIN) +# include +#endif + #include #include #include @@ -1464,6 +1468,12 @@ void MainWindow::loadWindowSettings() this->restoreState(config.value(QString::fromLatin1("MainWindowState")).toByteArray()); } std::clog << "Main window restored" << std::endl; + +// make menus and tooltips usable in fullscreen under Windows, see issue #7563 +#if defined(Q_OS_WIN) + QWindowsWindowFunctions::setHasBorderInFullScreen(this->windowHandle(), true); +#endif + bool max = config.value(QString::fromLatin1("Maximized"), false).toBool(); max ? showMaximized() : show();