git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@583
7f0cb862-5218-0410-a997-
914c9d46530a
/* Set up the initial menu position now: */
fghGetVMaxExtent(menu->ParentWindow, &max_x, &max_y);
/* Set up the initial menu position now: */
fghGetVMaxExtent(menu->ParentWindow, &max_x, &max_y);
- menu->X = window->State.MouseX + max_x;
- menu->Y = window->State.MouseY + max_y;
+ menu->X = window->State.MouseX + glutGet( GLUT_WINDOW_X );
+ menu->Y = window->State.MouseY + glutGet( GLUT_WINDOW_Y );
- if( menu->X + menu->Width > glutGet ( GLUT_SCREEN_WIDTH ) )
+ if( menu->X + menu->Width > max_x )
- if( menu->Y + menu->Height > glutGet ( GLUT_SCREEN_HEIGHT ) )
+ if( menu->Y + menu->Height > max_y )
menu->Y -=menu->Height;
fgSetWindow( menu->Window );
menu->Y -=menu->Height;
fgSetWindow( menu->Window );