diff options
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index d53b4e6ab9..c4512b4d2d 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -580,7 +580,7 @@ QWinRTScreen::QWinRTScreen() d->orientation = d->nativeOrientation; onOrientationChanged(Q_NULLPTR, Q_NULLPTR); - d->eglDisplay = eglGetDisplay(d->displayInformation.Get()); + d->eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (d->eglDisplay == EGL_NO_DISPLAY) qCritical("Failed to initialize EGL display: 0x%x", eglGetError()); @@ -616,14 +616,7 @@ QWinRTScreen::QWinRTScreen() d->eglConfig = q_configFromGLFormat(d->eglDisplay, d->surfaceFormat); d->surfaceFormat = q_glFormatFromConfig(d->eglDisplay, d->eglConfig, d->surfaceFormat); - const QRect bounds = geometry(); - EGLint windowAttributes[] = { - EGL_FIXED_SIZE_ANGLE, EGL_TRUE, - EGL_WIDTH, bounds.width(), - EGL_HEIGHT, bounds.height(), - EGL_NONE - }; - d->eglSurface = eglCreateWindowSurface(d->eglDisplay, d->eglConfig, d->coreWindow.Get(), windowAttributes); + d->eglSurface = eglCreateWindowSurface(d->eglDisplay, d->eglConfig, d->coreWindow.Get(), NULL); if (d->eglSurface == EGL_NO_SURFACE) qCritical("Failed to create EGL window surface: 0x%x", eglGetError()); } @@ -1087,14 +1080,6 @@ HRESULT QWinRTScreen::onSizeChanged(ICoreWindow *, IWindowSizeChangedEventArgs * d->logicalSize = logicalSize; if (d->eglDisplay) { const QRect newGeometry = geometry(); - 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); QWindowSystemInterface::handleScreenGeometryChange(screen(), newGeometry, newGeometry); QPlatformScreen::resizeMaximizedWindows(); handleExpose(); |