UI: Fix missing files dialog starting hidden (macOS)
An annoying hack to fix the dialog being hidden behind the main window when the program starts up on macOS.
This commit is contained in:
parent
eb4dbb72c7
commit
6372f51bda
1 changed files with 9 additions and 4 deletions
|
|
@ -1164,10 +1164,15 @@ retryScene:
|
|||
LogScenes();
|
||||
|
||||
if (obs_missing_files_count(files) > 0) {
|
||||
missDialog = new OBSMissingFiles(files, this);
|
||||
missDialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
missDialog->show();
|
||||
missDialog->raise();
|
||||
/* the window hasn't fully initialized by this point on macOS,
|
||||
* so put this at the end of the current task queue. Fixes a
|
||||
* bug where the window be behind OBS on startup */
|
||||
QTimer::singleShot(0, [this, files] {
|
||||
missDialog = new OBSMissingFiles(files, this);
|
||||
missDialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
missDialog->show();
|
||||
missDialog->raise();
|
||||
});
|
||||
} else {
|
||||
obs_missing_files_destroy(files);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue