iOS: Prefer window states over geometry-heuristics when laying out windows

A window that was resized to the full screen size of the screen would
otherwise always stay in full screen, even if the window state was
maximized.

Change-Id: I4720f7b6ad1d85658ea96c6da0515693e8c827f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2013-11-25 15:07:21 +01:00 committed by The Qt Project
parent 8f32476542
commit 6820ac594a

View File

@ -231,9 +231,13 @@ void QIOSScreen::layoutWindows()
if (!platformWindow)
continue;
if (window->windowState() & Qt::WindowFullScreen || window->geometry() == oldGeometry)
// FIXME: Handle more complex cases of no-state and/or child windows when rotating
if (window->windowState() & Qt::WindowFullScreen
|| (window->windowState() & Qt::WindowNoState && window->geometry() == oldGeometry))
platformWindow->applyGeometry(newGeometry);
else if (window->windowState() & Qt::WindowMaximized || window->geometry() == oldAvailableGeometry)
else if (window->windowState() & Qt::WindowMaximized
|| (window->windowState() & Qt::WindowNoState && window->geometry() == oldAvailableGeometry))
platformWindow->applyGeometry(newAvailableGeometry);
}
}