Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorVincent Blankfield <vvv>2021-03-27 00:30:57 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-03-27 00:30:57 +0300
commit9b87d3f029626d124a7814512aac79a1b637baa7 (patch)
tree03525ec0db13effb4a81b928cae9427d71d7b8cf /intern
parent0ec82477af9bc55e933694300ccd9666fd9534de (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')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp9
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);