Use QWindow::windowStates() for WindowStateChangedEvent::oldState

WindowStateChangedEvent::oldState is of type Qt::WindowStates and should
therefore be set to QWindow::windowStates() instead of QWindow::windowState()

Change-Id: I6710624dd303642a31bfbb25bc07bf05b921d84c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
bb10
Johan Klokkhammer Helsing 2018-03-06 10:02:21 +01:00 committed by Johan Helsing
parent 54190595ef
commit c6ea77f59d
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt:
{
Q_ASSERT(window);
if (oldState < Qt::WindowNoState)
oldState = window->windowState();
oldState = window->windowStates();
QWindowSystemInterfacePrivate::WindowStateChangedEvent *e =
new QWindowSystemInterfacePrivate::WindowStateChangedEvent(window, newState, Qt::WindowStates(oldState));