diff options
author | Vincent Blankfield <vvv> | 2021-03-27 00:30:57 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-03-27 00:30:57 +0300 |
commit | 9b87d3f029626d124a7814512aac79a1b637baa7 (patch) | |
tree | 03525ec0db13effb4a81b928cae9427d71d7b8cf /intern/ghost | |
parent | 0ec82477af9bc55e933694300ccd9666fd9534de (diff) |
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
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 7496874b4b9..28ce1381562 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -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); |