Don't resize windows that aren't attached to a platform window

QWindows that aren't created, and therefore don't have a platform window
attached, should not be treated as "normal" windows. The expectation,
in our code, is that these windows won't get their geometry updated by
the platform plugin, and that the geometry is only changed by the owner.
In QQuickWidget's case this was causing the scene to be rendered
incorrectly.

Task-number: QTBUG-50973
Change-Id: Iea62dfb7fa90cbe450a662c5792c7c4f49c991fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Christian Strømme 2016-10-06 17:49:52 +02:00 committed by Christian Stromme
parent f4fff02cbb
commit f12006e644

View File

@ -335,6 +335,10 @@ void QPlatformScreen::resizeMaximizedWindows()
for (int i = 0; i < windows.size(); ++i) {
QWindow *w = windows.at(i);
// Skip non-platform windows, e.g., offscreen windows.
if (!w->handle())
continue;
if (platformScreenForWindow(w) != this)
continue;