Mirclient: Improved support for autotests
Outside qmlscene, a window may be created before its size has been set. So check if the size is valid before using it. Also, allow an app to bypass the adjustment to the requested window size that is normally done in order to leave room for the system's status panel. Such adjustment does not make sense in the context of autotests, and would often cause false test failures. Change-Id: I1627a2e4c37c68ac61c4976be5b73045eb2bb989 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This commit is contained in:
parent
de50a6da9f
commit
24c50f8dcf
@ -158,7 +158,7 @@ QMirClientWindow::QMirClientWindow(QWindow* w, QSharedPointer<QMirClientClipboar
|
||||
d->id = id++;
|
||||
|
||||
// Use client geometry if set explicitly, use available screen geometry otherwise.
|
||||
QPlatformWindow::setGeometry(window()->geometry() != screen->geometry() ?
|
||||
QPlatformWindow::setGeometry(window()->geometry().isValid() && window()->geometry() != screen->geometry() ?
|
||||
window()->geometry() : screen->availableGeometry());
|
||||
createWindow();
|
||||
DLOG("QMirClientWindow::QMirClientWindow (this=%p, w=%p, screen=%p, input=%p)", this, w, screen, input);
|
||||
@ -198,6 +198,8 @@ void QMirClientWindowPrivate::destroyEGLSurface()
|
||||
// we need to guess the panel height (3GU + 2DP)
|
||||
int QMirClientWindowPrivate::panelHeight()
|
||||
{
|
||||
if (qEnvironmentVariableIsSet("QT_MIRCLIENT_IGNORE_PANEL"))
|
||||
return 0;
|
||||
const int defaultGridUnit = 8;
|
||||
int gridUnit = defaultGridUnit;
|
||||
QByteArray gridUnitString = qgetenv("GRID_UNIT_PX");
|
||||
|
Loading…
x
Reference in New Issue
Block a user