diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2009-07-26 00:16:56 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2009-07-26 00:16:56 +0400 |
commit | dff9dce1cdcb5250797f529456649510d2396096 (patch) | |
tree | 981120e585e33c3a2e4bd61b6ebcff759d7bd00f /intern | |
parent | 90a08b1c78389bd032394ffed1ecd3b5c76d8ed7 (diff) |
Windows: fixing user preference window opening full screen
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 759951802af..366adb3ab86 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -117,18 +117,34 @@ GHOST_WindowWin32::GHOST_WindowWin32( m_maxPressure(0) { if (state != GHOST_kWindowStateFullScreen) { - // take taskbar into account RECT rect; + GHOST_TUns32 tw, th; + + width += GetSystemMetrics(SM_CXSIZEFRAME)*2; + height += GetSystemMetrics(SM_CYSIZEFRAME)*2 + GetSystemMetrics(SM_CYCAPTION); + + // take taskbar into account SystemParametersInfo(SPI_GETWORKAREA,0,&rect,0); - height = rect.bottom - rect.top; - width = rect.right - rect.left; + th = rect.bottom - rect.top; + tw = rect.right - rect.left; + + if(tw < width) + { + width = tw; + left = rect.left; + } + if(th < height) + { + height = th; + top = rect.top; + } m_hWnd = ::CreateWindow( s_windowClassName, // pointer to registered class name title, // pointer to window name WS_OVERLAPPEDWINDOW, // window style - rect.left, // horizontal position of window - rect.top, // vertical position of window + left, // horizontal position of window + top, // vertical position of window width, // window width height, // window height 0, // handle to parent or owner window |