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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user