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>
This commit is contained in:
parent
00bafafbee
commit
095f2d5292
@ -135,9 +135,12 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
|
|||||||
// Add window to plugin's window mapper
|
// Add window to plugin's window mapper
|
||||||
QQnxIntegration::addWindow(m_window, window);
|
QQnxIntegration::addWindow(m_window, window);
|
||||||
|
|
||||||
// setWindowState() does not get called when the platform window hasn't been created yet, so
|
// Qt never calls these setters after creating the window, so we need to do that ourselves here
|
||||||
// make sure to apply the inital window state here
|
|
||||||
setWindowState(window->windowState());
|
setWindowState(window->windowState());
|
||||||
|
if (window->parent())
|
||||||
|
setParent(window->parent()->handle());
|
||||||
|
setGeometry(window->geometry());
|
||||||
|
setVisible(window->isVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
QQnxWindow::~QQnxWindow()
|
QQnxWindow::~QQnxWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user