UI: Check to ensure window starts up inside a monitor
Fixes an issue where the main window would load off-screen if its last saved position was inside a monitor that no longer exists.
This commit is contained in:
parent
0157d02564
commit
8932bd39d1
3 changed files with 22 additions and 0 deletions
|
|
@ -132,6 +132,9 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
int posy = config_get_int(App()->GlobalConfig(), "BasicWindow",
|
||||
"posy");
|
||||
|
||||
if (!WindowPositionValid(posx, posy))
|
||||
posx = posy = 0;
|
||||
|
||||
setGeometry(posx, posy, width, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue