QNX: Fixed some window issues

Corrected EGL error code query and cover windows creation in the
"no-rootwindow" case.

Change-Id: I86aaa4b59283f7153f8ab63c5bf231bc9da7538c
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
This commit is contained in:
Bernd Weimer 2014-01-15 14:35:07 +01:00 committed by The Qt Project
parent 0893d2d7e5
commit 338f4c9246
2 changed files with 11 additions and 6 deletions

View File

@ -97,8 +97,8 @@ void QQnxEglWindow::createEGLSurface()
, platformOpenGLContext()->getEglConfig(), , platformOpenGLContext()->getEglConfig(),
(EGLNativeWindowType) nativeHandle(), eglSurfaceAttrs); (EGLNativeWindowType) nativeHandle(), eglSurfaceAttrs);
if (m_eglSurface == EGL_NO_SURFACE) { if (m_eglSurface == EGL_NO_SURFACE) {
QQnxGLContext::checkEGLError("eglCreateWindowSurface"); const EGLenum error = QQnxGLContext::checkEGLError("eglCreateWindowSurface");
qFatal("QQNX: failed to create EGL surface, err=%d", eglGetError()); qFatal("QQNX: failed to create EGL surface, err=%d", error);
} }
} }

View File

@ -586,13 +586,18 @@ void QQnxWindow::initWindow()
qFatal("QQnxWindow: failed to set window sensitivity, errno=%d", errno); qFatal("QQnxWindow: failed to set window sensitivity, errno=%d", errno);
} }
setScreen(static_cast<QQnxScreen *>(window()->screen()->handle())); QQnxScreen *platformScreen = static_cast<QQnxScreen *>(window()->screen()->handle());
setScreen(platformScreen);
if (window()->type() == Qt::CoverWindow) { if (window()->type() == Qt::CoverWindow) {
#if defined(Q_OS_BLACKBERRY) && !defined(Q_OS_BLACKBERRY_TABLET) #if defined(Q_OS_BLACKBERRY) && !defined(Q_OS_BLACKBERRY_TABLET)
if (platformScreen->rootWindow()) {
screen_set_window_property_pv(m_screen->rootWindow()->nativeHandle(), screen_set_window_property_pv(m_screen->rootWindow()->nativeHandle(),
SCREEN_PROPERTY_ALTERNATE_WINDOW, (void**)&m_window); SCREEN_PROPERTY_ALTERNATE_WINDOW, (void**)&m_window);
m_cover.reset(new QQnxNavigatorCover); m_cover.reset(new QQnxNavigatorCover);
} else {
qWarning("No root window for cover window");
}
#endif #endif
m_exposed = false; m_exposed = false;
} }