Win32: Allow return from fullscreen to maximized
If window is maximized when toggling fullscreen, go back to maximized when done. Differential Revision: https://developer.blender.org/D10813 Reviewed by Harley Acheson
This commit is contained in:
parent
0ec82477af
commit
9b87d3f029
Notes:
blender-bot
2023-02-14 05:12:59 +01:00
Referenced by issue #86952, Heap Buffer Overflow when viewing dds thumbnails in the file browser.
|
@ -537,7 +537,14 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
|
|||
break;
|
||||
case GHOST_kWindowStateNormal:
|
||||
default:
|
||||
wp.showCmd = SW_SHOWNORMAL;
|
||||
if (curstate == GHOST_kWindowStateFullScreen &&
|
||||
m_normal_state == GHOST_kWindowStateMaximized) {
|
||||
wp.showCmd = SW_SHOWMAXIMIZED;
|
||||
m_normal_state = GHOST_kWindowStateNormal;
|
||||
}
|
||||
else {
|
||||
wp.showCmd = SW_SHOWNORMAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
::SetWindowLongPtr(m_hWnd, GWL_STYLE, style);
|
||||
|
|
Loading…
Reference in New Issue