Jelajahi Sumber

Adding setting to disable minimize-on-defocus on Windows

I need it for testing, though it also might help certain users for now.
Vincent Lang 9 tahun lalu
induk
melakukan
d858450017

+ 6 - 0
resources/settings/settings_description.json

@@ -28,6 +28,12 @@
         "default": true,
         "platforms_excluded": "oe"
       },
+      {
+        "value": "minimizeOnDefocus",
+        "default": true,
+        "platforms": [ "windows" ],
+        "hidden": true
+      },
       {
         "value": "webserverport",
         "default": 32433,

+ 1 - 1
src/ui/KonvergoWindow.cpp

@@ -277,7 +277,7 @@ void KonvergoWindow::focusOutEvent(QFocusEvent * ev)
 #ifdef Q_OS_WIN32
   // Do this to workaround DWM compositor bugs with fullscreened OpenGL applications.
   // The compositor will not properly redraw anything when focusing other windows.
-  if (visibility() == QWindow::FullScreen)
+  if (visibility() == QWindow::FullScreen && SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "minimizeOnDefocus").toBool())
     showMinimized();
 #endif
 }