make sure there is any screen geometry returned
if the heuristic fails (because the topleft of the dialog is offscreen) use at least our screen() the screen should be correctly updated now on Qt 5.3+ so should be more reliable anyways (could be tried to remove the whole Q_FOREACH at this point) Change-Id: I29311f4767bde3e02ae7bcb54b400b72a8f190eb
This commit is contained in:
parent
8d2aa05530
commit
2b07624173
@ -159,6 +159,17 @@ QRect DialogPrivate::availableScreenGeometryForPosition(const QPoint& pos) const
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if the heuristic fails (because the topleft of the dialog is offscreen)
|
||||
* use at least our screen()
|
||||
* the screen should be correctly updated now on Qt 5.3+ so should be
|
||||
* more reliable anyways (could be tried to remove the whole Q_FOREACH
|
||||
* at this point)
|
||||
*/
|
||||
if (avail.isEmpty()) {
|
||||
avail = q->screen()->availableGeometry();
|
||||
}
|
||||
|
||||
return avail;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user