Skip to content

Commit

Permalink
Fix bug #7563 where menus and tooltips are not visible in fullscreen …
Browse files Browse the repository at this point in the history
…mode on windows systems. (#8027)

* Fix bug where menus and tooltips are not visible in fullscreen mode on windows systems.
  • Loading branch information
kzootech committed Dec 12, 2022
1 parent 7637d58 commit 2f575a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Gui/MainWindow.cpp
Expand Up @@ -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>
Expand Down Expand Up @@ -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();

Expand Down

1 comment on commit 2f575a3

@adrianinsaval
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit caused #9086, @kzootech could you take a look at it?

@donovaly I think you backported this to the 0.20 branch too, consider reverting this to not ship this bug in a stable release

Please sign in to comment.