diff options
author | Thomas McGuire <thomas.mcguire.qnx@kdab.com> | 2012-07-11 16:34:20 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-13 09:55:18 +0200 |
commit | 095f2d5292ddfb4c77056af89c11327d85af282b (patch) | |
tree | e0a91639b3f9cde82bebbf37d07fba70defa64c0 | |
parent | 00bafafbee3db66738ad5e96fcc69a480adc7428 (diff) |
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 <marc.mutz@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.cpp | 7 |
1 files 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() |