From: Diederick Niehorster Date: Wed, 27 Aug 2014 10:14:44 +0000 (+0000) Subject: caption height should include the width of the border atop the window X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=9bc75d9931f8f73804fd6cb0911ec7300cc0de79;p=freeglut caption height should include the width of the border atop the window git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1700 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/progs/demos/Resizer/Resizer.cpp b/progs/demos/Resizer/Resizer.cpp index f2ff68a..4828915 100644 --- a/progs/demos/Resizer/Resizer.cpp +++ b/progs/demos/Resizer/Resizer.cpp @@ -334,7 +334,7 @@ void Timer(int unused) width, height, x ,y, x-border, - y-border-caption); + y-caption); else printf("child window %dx%d, top-left of client at: (%d,%d), relative to parent\n", width, height, diff --git a/src/mswin/fg_state_mswin.c b/src/mswin/fg_state_mswin.c index 4c0ca30..aada564 100644 --- a/src/mswin/fg_state_mswin.c +++ b/src/mswin/fg_state_mswin.c @@ -256,7 +256,7 @@ int fgPlatformGlutGet ( GLenum eWhat ) * all other extra pixels are assumed to be atop the window, forming the caption. */ borderWidth = ((winRect.right-winRect.left)-(clientRect.right-clientRect.left))/2; - captionHeight = (winRect.bottom-winRect.top)-(clientRect.bottom-clientRect.top)-borderWidth*2; + captionHeight = (winRect.bottom-winRect.top)-(clientRect.bottom-clientRect.top)-borderWidth; /* include top border in caption height */ switch( eWhat ) {