X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_state_mswin.c;h=bea609e8e2ae741bf0164b0f5290bfd1ee4db925;hb=2272bd5a70b8bac63e1535fee6257cc4595f36e7;hp=9df5211443c3f852792c765eab9db779f57f0411;hpb=53f21146d3dbb405e402e3e1c364361757269848;p=freeglut diff --git a/src/mswin/fg_state_mswin.c b/src/mswin/fg_state_mswin.c index 9df5211..bea609e 100644 --- a/src/mswin/fg_state_mswin.c +++ b/src/mswin/fg_state_mswin.c @@ -187,11 +187,9 @@ int fgPlatformGlutGet ( GLenum eWhat ) if (fgStructure.CurrentWindow->Parent && (eWhat==GLUT_WINDOW_X || eWhat==GLUT_WINDOW_Y)) { /* For child window, we should return relative to upper-left - * of parent's client area. + * of parent's client area. */ - POINT topleft; - topleft.x = winRect.left; - topleft.y = winRect.top; + POINT topleft = {winRect.left,winRect.top}; ScreenToClient(fgStructure.CurrentWindow->Parent->Window.Handle,&topleft); winRect.left = topleft.x;