From 54e4735f89489da9f1cf71b85561a4939e8a42e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 6 Feb 2017 15:20:10 +0100 Subject: qpa: Let platform plugins report old state for window state changes The previous logic relied on QPlatformWindow::setWindowState() being synchronous and delivering the QPA event before returning to QWindow, in which case window->windowState() would still refer to the old state. Async platforms can now report the previous state correctly. Change-Id: Ib9148fe23fb62be55b7e3a0ccf63d32c71dc2ad3 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/gui/kernel/qwindowsysteminterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qwindowsysteminterface.h') diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index eb52dd89b6..253584314c 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -176,7 +176,7 @@ public: static void handleWindowActivated(QWindow *window, Qt::FocusReason r = Qt::OtherFocusReason); template - static void handleWindowStateChanged(QWindow *window, Qt::WindowState newState); + static void handleWindowStateChanged(QWindow *window, Qt::WindowState newState, int oldState = -1); static void handleWindowScreenChanged(QWindow *window, QScreen *newScreen); static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false); -- cgit v1.2.3