QWindowsWindow: fix restoring from minimized to fullscreen
This fixes the state transition FullScreen -> Minimized -> FullScreen. Task-number: QTBUG-26420 Change-Id: I555c4f332e796b465149e592c2583d615b37c4ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>bb10
parent
84e84b507c
commit
a2bd91c5e9
|
|
@ -980,7 +980,7 @@ void QWindowsWindow::handleResized(int wParam)
|
|||
break;
|
||||
case SIZE_RESTORED:
|
||||
if (m_windowState != Qt::WindowNoState)
|
||||
handleWindowStateChange(Qt::WindowNoState);
|
||||
handleWindowStateChange(isFullScreen_sys() ? Qt::WindowFullScreen : Qt::WindowNoState);
|
||||
handleGeometryChange();
|
||||
break;
|
||||
}
|
||||
|
|
@ -1170,7 +1170,7 @@ Qt::WindowState QWindowsWindow::windowState_sys() const
|
|||
return Qt::WindowMinimized;
|
||||
if (IsZoomed(m_data.hwnd))
|
||||
return Qt::WindowMaximized;
|
||||
if (geometry_sys() == window()->screen()->geometry())
|
||||
if (isFullScreen_sys())
|
||||
return Qt::WindowFullScreen;
|
||||
return Qt::WindowNoState;
|
||||
}
|
||||
|
|
@ -1183,6 +1183,11 @@ Qt::WindowStates QWindowsWindow::windowStates_sys() const
|
|||
return result;
|
||||
}
|
||||
|
||||
bool QWindowsWindow::isFullScreen_sys() const
|
||||
{
|
||||
return geometry_sys() == window()->screen()->geometry();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Change the window state.
|
||||
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ private:
|
|||
inline QRect frameGeometry_sys() const;
|
||||
inline QRect geometry_sys() const;
|
||||
inline WindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const;
|
||||
inline bool isFullScreen_sys() const;
|
||||
inline void setWindowState_sys(Qt::WindowState newState);
|
||||
inline void setParent_sys(const QPlatformWindow *parent) const;
|
||||
inline void setMouseGrabEnabled_sys(bool grab);
|
||||
|
|
|
|||
Loading…
Reference in New Issue