Qt: Apply fullscreen during show event
Jeffrey Pfau jeffrey@endrift.com
Thu, 27 Aug 2015 19:24:59 -0700
2 files changed,
10 insertions(+),
0 deletions(-)
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -68,6 +68,7 @@ #endif
, m_mruMenu(nullptr) , m_shortcutController(new ShortcutController(this)) , m_playerId(playerId) + , m_fullscreenOnStart(false) { setFocusPolicy(Qt::StrongFocus); setAcceptDrops(true);@@ -469,6 +470,10 @@ QRect rect = frameGeometry();
rect.moveCenter(QApplication::desktop()->availableGeometry().center()); move(rect.topLeft()); } + if (m_fullscreenOnStart) { + enterFullScreen(); + m_fullscreenOnStart = false; + } } void Window::closeEvent(QCloseEvent* event) {@@ -518,6 +523,10 @@ toggleFullScreen();
} void Window::enterFullScreen() { + if (!isVisible()) { + m_fullscreenOnStart = true; + return; + } if (isFullScreen()) { return; }
M
src/platform/qt/Window.h
→
src/platform/qt/Window.h
@@ -163,6 +163,7 @@ QList<QString> m_mruFiles;
QMenu* m_mruMenu; ShortcutController* m_shortcutController; int m_playerId; + bool m_fullscreenOnStart; bool m_hitUnimplementedBiosCall;