Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Merged changes from "fix window disappearing on undock" for windows build.

Bloody Mess94e2902fbaea
diff --git a/toonz/sources/toonzqt/imageutils.cpp b/toonz/sources/toonzqt/imageutils.cpp
index a22bf9135..d2bee7ecf 100644
--- a/toonz/sources/toonzqt/imageutils.cpp
+++ b/toonz/sources/toonzqt/imageutils.cpp
@@ -965,6 +965,7 @@ void FullScreenWidget::setWidget(QWidget *widget) {
// application is in the process of quiting.
if (!kfApplicationQuitInProgress)
{
+#if !defined( _WIN32 )
//==============================================================
//
// NOTE:
@@ -1052,6 +1053,15 @@ void FullScreenWidget::setWidget(QWidget *widget) {
}
}
}
+#else
+ this->setWindowFlags( this->windowFlags() | Qt::Window | Qt::WindowStaysOnTopHint );
+
+ // http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows
+ this->winId();
+ QWindowsWindowFunctions::setHasBorderInFullScreen( this->windowHandle(), true );
+
+ this->showFullScreen();
+#endif
// Set the return value to indicate that the full screen mode has been changed.