X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_window_mswin.c;h=7af029d8d5f6cabd565c563e64ab54aa7ff01687;hb=89dd359a930dae8ea53261279c57aae9387642ef;hp=069834957469f4eed60b3f948d4678ec68d226d8;hpb=c0a9c566efc4ca3c4ea170f9b538c6c16cb481ed;p=freeglut diff --git a/src/mswin/fg_window_mswin.c b/src/mswin/fg_window_mswin.c index 0698349..7af029d 100644 --- a/src/mswin/fg_window_mswin.c +++ b/src/mswin/fg_window_mswin.c @@ -394,10 +394,12 @@ void fghComputeWindowRectFromClientArea_UseStyle( const DWORD windowStyle, RECT /* If window has title bar, correct rect for it */ if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */ + { if (posIsOutside) clientRect->bottom += GetSystemMetrics( SM_CYCAPTION ); else clientRect->top -= GetSystemMetrics( SM_CYCAPTION ); + } /* get width of window's borders (frame), correct rect for it. * Note, borders can be of zero width if style does not specify borders @@ -462,10 +464,12 @@ void fghComputeClientAreaFromWindowRect( const SFG_Window *window, RECT *windowR /* If window has title bar, correct rect for it */ if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */ + { if (wantPosOutside) windowRect->bottom -= GetSystemMetrics( SM_CYCAPTION ); else windowRect->top += GetSystemMetrics( SM_CYCAPTION ); + } /* get width of window's borders (frame), correct rect for it. * Note, borders can be of zero width if style does not specify borders @@ -804,7 +808,6 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title, UpdateWindow( window->Window.Handle ); ShowCursor( TRUE ); /* XXX Old comments say "hide cursor"! */ - }