|
@@ -98,6 +98,8 @@ struct SignalContainer {
|
|
|
|
|
|
}
|
|
|
|
|
|
+extern volatile long insideEventLoop;
|
|
|
+
|
|
|
Q_DECLARE_METATYPE(OBSScene);
|
|
|
Q_DECLARE_METATYPE(OBSSceneItem);
|
|
|
Q_DECLARE_METATYPE(OBSSource);
|
|
@@ -3761,6 +3763,15 @@ void OBSBasic::ClearSceneData()
|
|
|
|
|
|
void OBSBasic::closeEvent(QCloseEvent *event)
|
|
|
{
|
|
|
+ /* Do not close window if inside of a temporary event loop because we
|
|
|
+ * could be inside of an Auth::LoadUI call. Keep trying once per
|
|
|
+ * second until we've exit any known sub-loops. */
|
|
|
+ if (os_atomic_load_long(&insideEventLoop) != 0) {
|
|
|
+ QTimer::singleShot(1000, this, SLOT(close()));
|
|
|
+ event->ignore();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (isVisible())
|
|
|
config_set_string(App()->GlobalConfig(),
|
|
|
"BasicWindow", "geometry",
|
|
@@ -3860,9 +3871,28 @@ void OBSBasic::on_actionRemux_triggered()
|
|
|
|
|
|
void OBSBasic::on_action_Settings_triggered()
|
|
|
{
|
|
|
+ static bool settings_already_executing = false;
|
|
|
+
|
|
|
+ /* Do not load settings window if inside of a temporary event loop
|
|
|
+ * because we could be inside of an Auth::LoadUI call. Keep trying
|
|
|
+ * once per second until we've exit any known sub-loops. */
|
|
|
+ if (os_atomic_load_long(&insideEventLoop) != 0) {
|
|
|
+ QTimer::singleShot(1000, this,
|
|
|
+ SLOT(on_action_Settings_triggered()));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (settings_already_executing) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ settings_already_executing = true;
|
|
|
+
|
|
|
OBSBasicSettings settings(this);
|
|
|
settings.exec();
|
|
|
SystemTray(false);
|
|
|
+
|
|
|
+ settings_already_executing = false;
|
|
|
}
|
|
|
|
|
|
void OBSBasic::on_actionAdvAudioProperties_triggered()
|