added note about maximizing behavior on Windows (when the maximize
[freeglut] / src / fg_menu.c
index fb5f4a5..6a7d96d 100644 (file)
@@ -76,6 +76,7 @@ static float menu_pen_hback [4] = FREEGLUT_MENU_PEN_HBACK_COLORS;
 
 
 extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );
+extern void fghPlatformGetCursorPos(SFG_XYUse *mouse_pos);
 
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
 
@@ -545,7 +546,6 @@ static void fghActivateMenu( SFG_Window* window, int button )
         window->State.MouseY + glutGet( GLUT_WINDOW_Y ) - menu->Y;
 
     /* Menu status callback */
-    printf("Menu status callback: %p\n",fgState.MenuStatusCallback);
     if (fgState.MenuStateCallback || fgState.MenuStatusCallback)
     {
         fgStructure.CurrentMenu = menu;
@@ -721,12 +721,13 @@ void fgDeactivateMenu( SFG_Window *window )
         if (fgState.MenuStatusCallback)
         {
             /* Get cursor position on screen and convert to relative to parent_window's client area */
-            POINT mouse_pos;
-            GetCursorPos(&mouse_pos);
-            mouse_pos.x -= glutGet( GLUT_WINDOW_X );
-            mouse_pos.y -= glutGet( GLUT_WINDOW_Y );
+            SFG_XYUse mouse_pos;
+            fghPlatformGetCursorPos(&mouse_pos);
+            
+            mouse_pos.X -= glutGet( GLUT_WINDOW_X );
+            mouse_pos.Y -= glutGet( GLUT_WINDOW_Y );
 
-            fgState.MenuStatusCallback(GLUT_MENU_NOT_IN_USE, mouse_pos.x, mouse_pos.y);
+            fgState.MenuStatusCallback(GLUT_MENU_NOT_IN_USE, mouse_pos.X, mouse_pos.Y);
         }
     }
 }