浏览代码

UI: Don't close windows for "Always on Top" (win32)

On windows, the "Always on top" state can safely be used without closing
dialogs.

Closes obsproject/obs-studio#1207
Murnux 7 年之前
父节点
当前提交
273f5e2bfe
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      UI/window-basic-main.cpp

+ 4 - 2
UI/window-basic-main.cpp

@@ -5077,12 +5077,14 @@ void OBSBasic::on_previewDisabledLabel_customContextMenuRequested(
 
 
 void OBSBasic::on_actionAlwaysOnTop_triggered()
 void OBSBasic::on_actionAlwaysOnTop_triggered()
 {
 {
-	CloseDialogs();
-
+#ifndef _WIN32
 	/* Make sure all dialogs are safely and successfully closed before
 	/* Make sure all dialogs are safely and successfully closed before
 	 * switching the always on top mode due to the fact that windows all
 	 * switching the always on top mode due to the fact that windows all
 	 * have to be recreated, so queue the actual toggle to happen after
 	 * have to be recreated, so queue the actual toggle to happen after
 	 * all events related to closing the dialogs have finished */
 	 * all events related to closing the dialogs have finished */
+	CloseDialogs();
+#endif
+
 	QMetaObject::invokeMethod(this, "ToggleAlwaysOnTop",
 	QMetaObject::invokeMethod(this, "ToggleAlwaysOnTop",
 			Qt::QueuedConnection);
 			Qt::QueuedConnection);
 }
 }