diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-23 13:39:17 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-23 18:40:09 +0000 |
commit | 5c0bd3961fa17d594e2a14d142b75c0002856595 (patch) | |
tree | 8fa17f59519ba60dc4dd9615b823b4818c13c8c1 /src | |
parent | 41cdfbe3a473a4f691c193a58206d860cb9c676d (diff) |
Fix resize event flood when moving windows with High DPI scaling
Correctly scale the requested geometry in the constructor
of QWindowSystemInterfacePrivate::GeometryChangeEvent().
Amends 3a31c708790ba2bb3cf3dab32a17a83659a1acde.
Task-number: QTBUG-57608
Task-number: QTBUG-65580
Change-Id: I0ef60deda69bb61ab57972e02c342b7773e1da6b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index c47d940e4a..0a30fb78dc 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -283,9 +283,10 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleApplicationStateChanged, Qt::Application QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(QWindow *window, const QRect &newGeometry) : WindowSystemEvent(GeometryChange) , window(window) - , requestedGeometry(window->handle() ? window->handle()->QPlatformWindow::geometry() : QRect()) , newGeometry(newGeometry) { + if (const QPlatformWindow *pw = window->handle()) + requestedGeometry = QHighDpi::fromNativePixels(pw->QPlatformWindow::geometry(), window); } QT_DEFINE_QPA_EVENT_HANDLER(void, handleGeometryChange, QWindow *window, const QRect &newRect) |