From cd7f74dca332c19f5acfae8cbee3160cf22d3977 Mon Sep 17 00:00:00 2001 From: fayjf Date: Tue, 26 Apr 2005 15:52:27 +0000 Subject: [PATCH] Fixing erroneous implementation of Takeshi\'s fix git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@583 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_menu.c b/freeglut/freeglut/src/freeglut_menu.c index 00df7a8..bb04f48 100644 --- a/freeglut/freeglut/src/freeglut_menu.c +++ b/freeglut/freeglut/src/freeglut_menu.c @@ -540,13 +540,13 @@ static void fghActivateMenu( SFG_Window* window, int button ) /* 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 ) menu->X -=menu->Width; - if( menu->Y + menu->Height > glutGet ( GLUT_SCREEN_HEIGHT ) ) + if( menu->Y + menu->Height > max_y ) menu->Y -=menu->Height; fgSetWindow( menu->Window );