caption height should include the width of the border atop the window
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1700 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
f57980927a
commit
b0811138cc
@ -334,7 +334,7 @@ void Timer(int unused)
|
|||||||
width, height,
|
width, height,
|
||||||
x ,y,
|
x ,y,
|
||||||
x-border,
|
x-border,
|
||||||
y-border-caption);
|
y-caption);
|
||||||
else
|
else
|
||||||
printf("child window %dx%d, top-left of client at: (%d,%d), relative to parent\n",
|
printf("child window %dx%d, top-left of client at: (%d,%d), relative to parent\n",
|
||||||
width, height,
|
width, height,
|
||||||
|
@ -256,7 +256,7 @@ int fgPlatformGlutGet ( GLenum eWhat )
|
|||||||
* all other extra pixels are assumed to be atop the window, forming the caption.
|
* all other extra pixels are assumed to be atop the window, forming the caption.
|
||||||
*/
|
*/
|
||||||
borderWidth = ((winRect.right-winRect.left)-(clientRect.right-clientRect.left))/2;
|
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 )
|
switch( eWhat )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user