Moving the X11-specific code from "freeglut_menu.c" into its own file
[freeglut] / src / Common / freeglut_menu.c
index 2a963e2..8444d6e 100644 (file)
@@ -84,6 +84,9 @@ static float menu_pen_hfore [4] = {0.0f,  0.0f,  0.0f,  1.0f};
 static float menu_pen_hback [4] = {1.0f,  1.0f,  1.0f,  1.0f};\r
 #endif\r
 \r
+\r
+extern GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y );\r
+\r
 /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */\r
 \r
 /*\r
@@ -142,24 +145,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
 static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y )\r
 {\r
     if( fgStructure.GameModeWindow )\r
-    {\r
-#if TARGET_HOST_POSIX_X11\r
-        int wx, wy;\r
-        Window w;\r
-\r
-        XTranslateCoordinates(\r
-            fgDisplay.Display,\r
-            window->Window.Handle,\r
-            fgDisplay.RootWindow,\r
-            0, 0, &wx, &wy, &w);\r
-\r
-        *x = fgState.GameModeSize.X + wx;\r
-        *y = fgState.GameModeSize.Y + wy;\r
-#else\r
-        *x = glutGet ( GLUT_SCREEN_WIDTH );\r
-        *y = glutGet ( GLUT_SCREEN_HEIGHT );\r
-#endif\r
-    }\r
+               fgPlatformGetGameModeVMaxExtent ( window, x, y );\r
     else\r
     {\r
         *x = fgDisplay.ScreenWidth;\r
@@ -779,14 +765,6 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) )
     return fgCreateMenu( callback )->ID;\r
 }\r
 \r
-#if TARGET_HOST_MS_WINDOWS\r
-int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )\r
-{\r
-  __glutExitFunc = exit_function;\r
-  return glutCreateMenu( callback );\r
-}\r
-#endif\r
-\r
 /*\r
  * Destroys a menu object, removing all references to it\r
  */\r