Fix window position restore.

Ref #220
This commit is contained in:
Floris Bos 2021-05-04 22:53:12 +02:00
parent e2296deb1a
commit 258f9d77aa

View file

@ -235,9 +235,9 @@ int main(int argc, char *argv[])
if (x != -1 && y != -1)
{
if ( (screensize.width()-x) < w || (screensize.height()-y) < h)
if ( !app.screenAt(QPoint(x,y)) || !app.screenAt(QPoint(x+w,y+h)) )
{
qDebug() << "Not restoring saved window position as it falls outside of primary screen";
qDebug() << "Not restoring saved window position as it falls outside any currently attached screen";
x = y = -1;
}
}