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.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 2e0febff20..5a405f9577 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -174,7 +174,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
// indication that we want to create a child window and join that window group.
const QVariant windowGroup = window->property("qnxInitialWindowGroup");
- if (window->type() == Qt::CoverWindow || window->type() == Qt::Desktop) {
+ if (window->type() == Qt::CoverWindow) {
// Cover windows have to be top level to be accessible to window delegate (i.e. navigator)
// Desktop windows also need to be toplevel because they are not
// supposed to be part of the window hierarchy tree
@@ -189,10 +189,13 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
m_isTopLevel = !needRootWindow || !platformScreen->rootWindow();
}
+ if (window->type() == Qt::Desktop) // A desktop widget does not need a libscreen window
+ return;
+
if (m_isTopLevel) {
Q_SCREEN_CRITICALERROR(screen_create_window(&m_window, m_screenContext),
"Could not create top level window"); // Creates an application window
- if (window->type() != Qt::CoverWindow && window->type() != Qt::Desktop) {
+ if (window->type() != Qt::CoverWindow) {
if (needRootWindow)
platformScreen->setRootWindow(this);
}
@@ -245,9 +248,9 @@ void QQnxWindow::setGeometry(const QRect &rect)
if (shouldMakeFullScreen())
newGeometry = screen()->geometry();
- setGeometryHelper(newGeometry);
+ if (window()->type() != Qt::Desktop)
+ setGeometryHelper(newGeometry);
- QWindowSystemInterface::handleGeometryChange(window(), newGeometry);
if (isExposed())
QWindowSystemInterface::handleExposeEvent(window(), newGeometry);
}
@@ -278,13 +281,15 @@ void QQnxWindow::setGeometryHelper(const QRect &rect)
"Failed to set window source size");
screen_flush_context(m_screenContext, 0);
+
+ QWindowSystemInterface::handleGeometryChange(window(), rect);
}
void QQnxWindow::setVisible(bool visible)
{
qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "visible =" << visible;
- if (m_visible == visible)
+ if (m_visible == visible || window()->type() == Qt::Desktop)
return;
// The first time through we join a window group if appropriate.
@@ -667,6 +672,9 @@ void QQnxWindow::setRotation(int rotation)
void QQnxWindow::initWindow()
{
+ if (window()->type() == Qt::Desktop)
+ return;
+
// Alpha channel is always pre-multiplied if present
int val = SCREEN_PRE_MULTIPLIED_ALPHA;
Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ALPHA_MODE, &val),
@@ -711,12 +719,7 @@ void QQnxWindow::initWindow()
if (window()->parent() && window()->parent()->handle())
setParent(window()->parent()->handle());
- if (shouldMakeFullScreen())
- setGeometryHelper(screen()->geometry());
- else
- setGeometryHelper(window()->geometry());
-
- QWindowSystemInterface::handleGeometryChange(window(), screen()->geometry());
+ setGeometryHelper(shouldMakeFullScreen() ? screen()->geometry() : window()->geometry());
}
void QQnxWindow::createWindowGroup()