summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@theqtcompany.com>2015-10-29 11:39:14 +0100
committeraavit <eirik.aavitsland@theqtcompany.com>2015-11-03 08:20:42 +0000
commit24c50f8dcf7fa61ac3c3d4d6295c259a104a2b8c (patch)
tree6e3fae70ff05cea356f3863a3ac66139cb090f6f /src
parentde50a6da9fb2d001eb64512612686ae77ce0d5dc (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/mirclient/qmirclientwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/mirclient/qmirclientwindow.cpp b/src/plugins/platforms/mirclient/qmirclientwindow.cpp
index f3fd1e756d..3d1e5377e5 100644
--- a/src/plugins/platforms/mirclient/qmirclientwindow.cpp
+++ b/src/plugins/platforms/mirclient/qmirclientwindow.cpp
@@ -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");