From 095f2d5292ddfb4c77056af89c11327d85af282b Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Wed, 11 Jul 2012 16:34:20 +0200 Subject: [PATCH] QNX: Apply state from QWindow when creating new QQnxWindow Otherwise things like the window position and the parent/child relation were wrong. Change-Id: Ibe22a54f093f187e510f9c4258db2d80abe54a81 Reviewed-by: Marc Mutz Reviewed-by: Rafael Roquetto Reviewed-by: Kevin Krammer Reviewed-by: Giuseppe D'Angelo --- src/plugins/platforms/qnx/qqnxwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 0a7b2e2258..29ef5241c4 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -135,9 +135,12 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context) // Add window to plugin's window mapper QQnxIntegration::addWindow(m_window, window); - // setWindowState() does not get called when the platform window hasn't been created yet, so - // make sure to apply the inital window state here + // Qt never calls these setters after creating the window, so we need to do that ourselves here setWindowState(window->windowState()); + if (window->parent()) + setParent(window->parent()->handle()); + setGeometry(window->geometry()); + setVisible(window->isVisible()); } QQnxWindow::~QQnxWindow()