mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Store proper window pos/size
Only store the last restored (non-maximized and non-minimized) window position and size on exit.
This commit is contained in:
parent
f3104d92d5
commit
363d8b890d
|
@ -698,14 +698,17 @@ OBSBasic::~OBSBasic()
|
|||
|
||||
config_set_int(App()->GlobalConfig(), "General", "LastVersion",
|
||||
LIBOBS_API_VER);
|
||||
|
||||
QRect lastGeom = normalGeometry();
|
||||
|
||||
config_set_int(App()->GlobalConfig(), "MainWindow", "cx",
|
||||
this->width());
|
||||
lastGeom.width());
|
||||
config_set_int(App()->GlobalConfig(), "MainWindow", "cy",
|
||||
this->height());
|
||||
lastGeom.height());
|
||||
config_set_int(App()->GlobalConfig(), "MainWindow", "posx",
|
||||
this->pos().x());
|
||||
lastGeom.x());
|
||||
config_set_int(App()->GlobalConfig(), "MainWindow", "posy",
|
||||
this->pos().y());
|
||||
lastGeom.y());
|
||||
config_save(App()->GlobalConfig());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue