summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtscreen.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-15 01:00:50 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-15 01:00:51 +0100
commitef2ddcf551dec13215cb45cb000731f94b2f8e34 (patch)
treec8810f6ee77a81c3003ccc8783c9d3b17f0b8a5e /src/plugins/platforms/winrt/qwinrtscreen.cpp
parente2cf6ade3535467bc2f21b54b82ed007d5ce279b (diff)
parent501cca2c4b0851cea7133ba56c3a05d71c25ce6d (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.cpp')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 7f1854c601..e611c7be24 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -511,6 +511,7 @@ public:
QWindow *currentPressWindow = nullptr;
QWindow *currentTargetWindow = nullptr;
bool firstMouseMove = true;
+ bool resizePending = false;
};
// To be called from the XAML thread
@@ -1402,6 +1403,18 @@ void QWinRTScreen::emulateMouseMove(const QPointF &point, MousePositionTransitio
Qt::NoModifier);
}
+void QWinRTScreen::setResizePending()
+{
+ Q_D(QWinRTScreen);
+ d->resizePending = true;
+}
+
+bool QWinRTScreen::resizePending() const
+{
+ Q_D(const QWinRTScreen);
+ return d->resizePending;
+}
+
HRESULT QWinRTScreen::onActivated(ICoreWindow *, IWindowActivatedEventArgs *args)
{
Q_D(QWinRTScreen);
@@ -1507,7 +1520,7 @@ HRESULT QWinRTScreen::onRedirectReleased(ICorePointerRedirector *, IPointerEvent
return onPointerUpdated(nullptr, args);
}
-HRESULT QWinRTScreen::onWindowSizeChanged(IApplicationView *, IInspectable *)
+HRESULT QWinRTScreen::onWindowSizeChanged(IApplicationView *w, IInspectable *)
{
Q_D(QWinRTScreen);
@@ -1527,6 +1540,9 @@ HRESULT QWinRTScreen::onWindowSizeChanged(IApplicationView *, IInspectable *)
QWindowSystemInterface::handleScreenGeometryChange(screen(), geometry(), availableGeometry());
QPlatformScreen::resizeMaximizedWindows();
handleExpose();
+ // If we "emulate" a resize, w will be nullptr.Checking w shows whether it's a real resize
+ if (w)
+ d->resizePending = false;
return S_OK;
}