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
diff options
context:
space:
mode:
authorRob Haarsma <phaseIV@zonnet.nl>2003-05-08 20:22:41 +0400
committerRob Haarsma <phaseIV@zonnet.nl>2003-05-08 20:22:41 +0400
commit97feb53f3659ce4e074af29901a561fcac460d39 (patch)
treea7397613947443a4016e13d9556bb1cb966f3238 /intern/ghost
parentd53ca699c929ca1e4c4df41e32f73b93e916c7d7 (diff)
changed for the new fullscreen button (windows only)
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index b8e179650ba..dfcc91f471f 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -316,9 +316,24 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
wp.length = sizeof(WINDOWPLACEMENT);
::GetWindowPlacement(m_hWnd, &wp);
switch (state) {
- case GHOST_kWindowStateMinimized: wp.showCmd = SW_SHOWMAXIMIZED; break;
- case GHOST_kWindowStateMaximized: wp.showCmd = SW_SHOWMINIMIZED; break;
- case GHOST_kWindowStateNormal: default: wp.showCmd = SW_SHOWNORMAL; break;
+ case GHOST_kWindowStateMinimized:
+ wp.showCmd = SW_SHOWMINIMIZED;
+ break;
+ case GHOST_kWindowStateMaximized:
+ ShowWindow(m_hWnd, SW_HIDE); //fe. HACK!
+ //Solves redraw problems when switching from fullscreen to normal.
+
+ wp.showCmd = SW_SHOWMAXIMIZED;
+ SetWindowLong(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
+ break;
+ case GHOST_kWindowStateFullScreen:
+ wp.showCmd = SW_SHOWMAXIMIZED;
+ SetWindowLong(m_hWnd, GWL_STYLE, WS_POPUP | WS_MAXIMIZE);
+ break;
+ case GHOST_kWindowStateNormal:
+ default:
+ wp.showCmd = SW_SHOWNORMAL;
+ break;
}
return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}