diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2003-05-08 20:22:41 +0400 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2003-05-08 20:22:41 +0400 |
commit | 97feb53f3659ce4e074af29901a561fcac460d39 (patch) | |
tree | a7397613947443a4016e13d9556bb1cb966f3238 /intern/ghost | |
parent | d53ca699c929ca1e4c4df41e32f73b93e916c7d7 (diff) |
changed for the new fullscreen button (windows only)
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 21 |
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; } |