iOS: raise windows that becomes visible
When a QWindow becomes visible, it should move to front and be active. Change-Id: Icab12c6031c0cc8d791e4f8cc49b9c2d5c73100d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>bb10
parent
355f064ec9
commit
e83bed82c1
|
|
@ -264,7 +264,15 @@ void QIOSWindow::setVisible(bool visible)
|
|||
QPlatformWindow::setVisible(visible);
|
||||
m_view.hidden = !visible;
|
||||
|
||||
if (isQtApplication() && !visible) {
|
||||
if (!isQtApplication())
|
||||
return;
|
||||
|
||||
// Since iOS doesn't do window management the way a Qt application
|
||||
// expects, we need to raise and activate windows ourselves:
|
||||
if (visible) {
|
||||
raise();
|
||||
QWindowSystemInterface::handleWindowActivated(window());
|
||||
} else {
|
||||
// Activate top-most visible QWindow:
|
||||
NSArray *subviews = rootViewController().view.subviews;
|
||||
for (int i = int(subviews.count) - 1; i >= 0; --i) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue