summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 2b41631d06..e37c82740c 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -40,7 +40,9 @@
****************************************************************************/
#include "qqnxwindow.h"
+#ifndef QT_NO_OPENGL
#include "qqnxglcontext.h"
+#endif
#include "qqnxintegration.h"
#include "qqnxscreen.h"
@@ -59,7 +61,9 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
m_window(0),
m_currentBufferIndex(-1),
m_previousBufferIndex(-1),
+#ifndef QT_NO_OPENGL
m_platformOpenGLContext(0),
+#endif
m_screen(0),
m_parentWindow(0),
m_visible(true)
@@ -240,6 +244,9 @@ void QQnxWindow::setVisible(bool visible)
root->updateVisibility(root->m_visible);
window()->requestActivateWindow();
+
+ if (window()->isTopLevel() && visible)
+ QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
}
void QQnxWindow::updateVisibility(bool parentVisible)
@@ -278,6 +285,11 @@ void QQnxWindow::setOpacity(qreal level)
// the transparency will look wrong...
}
+bool QQnxWindow::isExposed() const
+{
+ return m_visible;
+}
+
void QQnxWindow::setBufferSize(const QSize &size)
{
#if defined(QQNXWINDOW_DEBUG)
@@ -293,6 +305,7 @@ void QQnxWindow::setBufferSize(const QSize &size)
// Create window buffers if they do not exist
if (!hasBuffers()) {
+#ifndef QT_NO_OPENGL
// Get pixel format from EGL config if using OpenGL;
// otherwise inherit pixel format of window's screen
if (m_platformOpenGLContext != 0) {
@@ -300,6 +313,7 @@ void QQnxWindow::setBufferSize(const QSize &size)
} else {
val[0] = m_screen->nativeFormat();
}
+#endif
errno = 0;
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_FORMAT, val);
@@ -545,12 +559,14 @@ void QQnxWindow::gainedFocus()
QWindowSystemInterface::handleWindowActivated(window());
}
+#ifndef QT_NO_OPENGL
void QQnxWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext)
{
// This function does not take ownership of the platform gl context.
// It is owned by the frontend QOpenGLContext
m_platformOpenGLContext = platformOpenGLContext;
}
+#endif
QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle)
{