diff options
author | Christian Strømme <christian.stromme@qt.io> | 2016-10-06 17:49:52 +0200 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2016-10-12 10:19:21 +0000 |
commit | f12006e64405de72ac09f364ef25ee9701c9b755 (patch) | |
tree | bb8c8db1cb6daf807f16a136ec4b976cc55397af /src | |
parent | f4fff02cbb1f9399f407c15a27741c6cd1a17133 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qplatformscreen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index 8e9767d69e..3ec7a4cf3f 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -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; |