Windows: Suppress window state change to normal when going from maximized to fullscreen.
Task-number: QTBUG-35166 Change-Id: Idcf2d2a5fd0dc59f35a287c106ca772d801550c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
9bb634a617
commit
225ada44eb
@ -1359,9 +1359,10 @@ void QWindowsWindow::handleResized(int wParam)
|
||||
handleGeometryChange();
|
||||
break;
|
||||
case SIZE_RESTORED:
|
||||
bool fullScreen = isFullScreen_sys();
|
||||
if ((m_windowState != Qt::WindowNoState) || fullScreen)
|
||||
handleWindowStateChange(fullScreen ? Qt::WindowFullScreen : Qt::WindowNoState);
|
||||
if (isFullScreen_sys())
|
||||
handleWindowStateChange(Qt::WindowFullScreen);
|
||||
else if (m_windowState != Qt::WindowNoState && !testFlag(MaximizeToFullScreen))
|
||||
handleWindowStateChange(Qt::WindowNoState);
|
||||
handleGeometryChange();
|
||||
break;
|
||||
}
|
||||
@ -1617,8 +1618,11 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
|
||||
if ((oldState == Qt::WindowMaximized) != (newState == Qt::WindowMaximized)) {
|
||||
if (visible && !(newState == Qt::WindowMinimized)) {
|
||||
setFlag(WithinMaximize);
|
||||
if (newState == Qt::WindowFullScreen)
|
||||
setFlag(MaximizeToFullScreen);
|
||||
ShowWindow(m_data.hwnd, (newState == Qt::WindowMaximized) ? SW_MAXIMIZE : SW_SHOWNOACTIVATE);
|
||||
clearFlag(WithinMaximize);
|
||||
clearFlag(MaximizeToFullScreen);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,8 @@ public:
|
||||
AlertState = 0x8000,
|
||||
Exposed = 0x10000,
|
||||
WithinCreate = 0x20000,
|
||||
WithinMaximize = 0x40000
|
||||
WithinMaximize = 0x40000,
|
||||
MaximizeToFullScreen = 0x80000
|
||||
};
|
||||
|
||||
QWindowsWindow(QWindow *window, const QWindowsWindowData &data);
|
||||
|
Loading…
Reference in New Issue
Block a user