瀏覽代碼

KonvergoWindow: simplify ifdefs

The code in both if branches is OSX-only, so merge the ifdefs into a
single one covering the whole thing.
Vincent Lang 8 年之前
父節點
當前提交
0ad1b84912
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/ui/KonvergoWindow.cpp

+ 2 - 4
src/ui/KonvergoWindow.cpp

@@ -428,20 +428,18 @@ void KonvergoWindow::onVisibilityChanged(QWindow::Visibility visibility)
     SystemComponent::Get().setCursorVisibility(false);
   }
 
+#ifdef Q_OS_MAC
   if (visibility == QWindow::Windowed)
   {
-#ifdef Q_OS_MAC
     QTimer::singleShot(1 * 1000, [&] { OSXUtils::SetPresentationOptions(m_osxPresentationOptions); });
-#endif
   }
   else if (visibility == QWindow::FullScreen)
   {
-#ifdef Q_OS_MAC
     QTimer::singleShot(1 * 1000, [&] {
       OSXUtils::SetPresentationOptions(m_osxPresentationOptions | OSXUtils::GetPresentationOptionsForFullscreen(!m_webDesktopMode));
     });
-#endif
   }
+#endif
 
   if (visibility == QWindow::Minimized)
     InputComponent::Get().cancelAutoRepeat();