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.
This commit is contained in:
MrBlock
2022-12-12 06:44:36 -05:00
committed by GitHub
parent 7637d58df0
commit 2f575a3c91

View File

@@ -53,6 +53,10 @@
# include <QPushButton>
#endif
#if defined(Q_OS_WIN)
# include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
@@ -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();