diff options
author | Andrew Knight <andrew.knight@theqtcompany.com> | 2014-12-04 15:21:28 +0200 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@theqtcompany.com> | 2014-12-05 05:37:01 +0100 |
commit | 5367fa356233da4c0f28172a8f817791525f5457 (patch) | |
tree | 6100c2b203925aba87b53b2ba08ea7519c5c56f3 | |
parent | bd5743f1d8472e70aeeccd08858130d4781bde41 (diff) | |
download | qtbase-5.4.0.tar.gz |
The fixed-size EGL display must be updated on PC as well as Windows Phone.
Task-number: QTBUG-43112
Change-Id: I0ba90370b67e8c065843e5754579e341b647266d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 612a50f6b7..37a3ff3d63 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -1081,12 +1081,14 @@ HRESULT QWinRTScreen::onSizeChanged(ICoreWindow *, IWindowSizeChangedEventArgs * d->logicalSize = logicalSize; if (d->eglDisplay) { const QRect newGeometry = geometry(); -#ifdef Q_OS_WINPHONE // Resize the EGL window - const int width = newGeometry.width() * (d->orientation == Qt::InvertedPortraitOrientation || d->orientation == Qt::LandscapeOrientation ? -1 : 1); - const int height = newGeometry.height() * (d->orientation == Qt::InvertedPortraitOrientation || d->orientation == Qt::InvertedLandscapeOrientation ? -1 : 1); + int width = newGeometry.width(); + int height = newGeometry.height(); +#ifdef Q_OS_WINPHONE // Windows Phone can pass in a negative size to provide orientation information + width *= (d->orientation == Qt::InvertedPortraitOrientation || d->orientation == Qt::LandscapeOrientation) ? -1 : 1; + height *= (d->orientation == Qt::InvertedPortraitOrientation || d->orientation == Qt::InvertedLandscapeOrientation) ? -1 : 1; +#endif eglSurfaceAttrib(d->eglDisplay, d->eglSurface, EGL_WIDTH, width); eglSurfaceAttrib(d->eglDisplay, d->eglSurface, EGL_HEIGHT, height); -#endif QWindowSystemInterface::handleScreenGeometryChange(screen(), newGeometry, newGeometry); QPlatformScreen::resizeMaximizedWindows(); handleExpose(); |