UI: Don't use "quit on last window closed"
Instead, quit only when the main window has been fully closed (and not minimized to tray). Fixes a bug where if the main window is minimized to tray and another non-child window is open (for example, the stats window), and then that window is closed, would cause the program to prematurely exit and crash.master
parent
d13fa96851
commit
13741034dd
|
@ -939,6 +939,8 @@ bool OBSApp::OBSInit()
|
|||
blog(LOG_INFO, "Portable mode: %s",
|
||||
portable_mode ? "true" : "false");
|
||||
|
||||
setQuitOnLastWindowClosed(false);
|
||||
|
||||
mainWindow = new OBSBasic();
|
||||
|
||||
mainWindow->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
|
|
@ -2977,6 +2977,8 @@ void OBSBasic::closeEvent(QCloseEvent *event)
|
|||
/* Clear all scene data (dialogs, widgets, widget sub-items, scenes,
|
||||
* sources, etc) so that all references are released before shutdown */
|
||||
ClearSceneData();
|
||||
|
||||
App()->quit();
|
||||
}
|
||||
|
||||
void OBSBasic::changeEvent(QEvent *event)
|
||||
|
|
Loading…
Reference in New Issue