diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index b6e09f90d..9f3cdc00b 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -132,10 +133,15 @@ 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); + if (!WindowPositionValid(posx, posy)) { + QRect rect = App()->desktop()->availableGeometry(); + setGeometry(QStyle::alignedRect( + Qt::LeftToRight, + Qt::AlignCenter, + size(), rect)); + } else { + setGeometry(posx, posy, width, height); + } } char styleSheetPath[512];