Przeglądaj źródła

KonvergoWindow: ignore unexpected visibility states

Fixes fullscreen restoring on Windows. For some reason, on Windows we
see that the window gets into the Hidden state on exit, so
fullscreen=false will be written to the config file.
Vincent Lang 8 lat temu
rodzic
commit
d452e8300a
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/ui/KonvergoWindow.cpp

+ 2 - 2
src/ui/KonvergoWindow.cpp

@@ -294,12 +294,12 @@ void KonvergoWindow::onVisibilityChanged(QWindow::Visibility visibility)
   if (visibility == QWindow::Windowed)
     loadGeometry();
 
-  bool fs = visibility == QWindow::FullScreen;
 
-  {
+  if (visibility == QWindow::FullScreen || visibility == QWindow::Windowed) {
     m_ignoreFullscreenSettingsChange++;
     ScopedDecrementer decrement(&m_ignoreFullscreenSettingsChange);
 
+    bool fs = visibility == QWindow::FullScreen;
     SettingsComponent::Get().setValue(SETTINGS_SECTION_MAIN, "fullscreen", fs);
   }