From 105c4111d91f3b19b813ebe482af15b97f7c96ff Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Wed, 17 Mar 2021 10:06:19 +0900 Subject: [PATCH] fix mainwindow fullscreen --- toonz/sources/toonz/mainwindow.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index 3a76c97e..477e4e30 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -55,6 +55,9 @@ #include #include #include +#ifdef _WIN32 +#include +#endif TEnv::IntVar ViewCameraToggleAction("ViewCameraToggleAction", 1); TEnv::IntVar ViewTableToggleAction("ViewTableToggleAction", 0); @@ -1263,9 +1266,16 @@ void MainWindow::maximizePanel() { void MainWindow::fullScreenWindow() { if (isFullScreen()) - setWindowState(Qt::WindowMaximized); - else - setWindowState(Qt::WindowFullScreen); + showNormal(); + else { +#if defined(_WIN32) + // http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows + this->winId(); + QWindowsWindowFunctions::setHasBorderInFullScreen(this->windowHandle(), + true); +#endif + this->showFullScreen(); + } } //-----------------------------------------------------------------------------