Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowWin32.cpp
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| case GHOST_kWindowStateNormal: | case GHOST_kWindowStateNormal: | ||||
| default: | default: | ||||
| if (curstate == GHOST_kWindowStateFullScreen && | if (curstate == GHOST_kWindowStateFullScreen && | ||||
| m_normal_state == GHOST_kWindowStateMaximized) { | m_normal_state == GHOST_kWindowStateMaximized) { | ||||
| wp.showCmd = SW_SHOWMAXIMIZED; | wp.showCmd = SW_SHOWMAXIMIZED; | ||||
| m_normal_state = GHOST_kWindowStateNormal; | m_normal_state = GHOST_kWindowStateNormal; | ||||
| } | } | ||||
| else { | else { | ||||
| /* GetWindowPlacement position is wrong if Aero Snap. */ | |||||
LazyDodo: weird sentence, also why is Snap capitalized? | |||||
| GetWindowRect(m_hWnd, &wp.rcNormalPosition); | |||||
| wp.showCmd = SW_SHOWNORMAL; | wp.showCmd = SW_SHOWNORMAL; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ::SetWindowLongPtr(m_hWnd, GWL_STYLE, style); | ::SetWindowLongPtr(m_hWnd, GWL_STYLE, style); | ||||
| /* SetWindowLongPtr Docs: frame changes not visible until SetWindowPos with SWP_FRAMECHANGED. */ | /* SetWindowLongPtr Docs: frame changes not visible until SetWindowPos with SWP_FRAMECHANGED. */ | ||||
| ::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); | ::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); | ||||
| return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; | return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||
weird sentence, also why is Snap capitalized?