fghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindo...
[freeglut] / src / x11 / fg_main_x11.c
index 3ecb811..c803b2b 100644 (file)
@@ -40,6 +40,7 @@
 #    define VFPRINTF(s,f,a)
 #endif
 
+
 /*
  * Try to get the maximum value allowed for ints, falling back to the minimum
  * guaranteed by ISO C99 if there is no suitable header.
@@ -70,27 +71,6 @@ static Bool match_motion(Display *dpy, XEvent *xev, XPointer arg);
  */
  
  
-/*
- * Handle a window configuration change. When no reshape
- * callback is hooked, the viewport size is updated to
- * match the new window size.
- */
-void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height )
-{
-    XResizeWindow( fgDisplay.pDisplay.Display, window->Window.Handle,
-                   width, height );
-    XFlush( fgDisplay.pDisplay.Display ); /* XXX Shouldn't need this */
-}
-
-
-/*
- * A static helper function to execute display callback for a window
- */
-void fgPlatformDisplayWindow ( SFG_Window *window )
-{
-        fghRedrawWindow ( window ) ;
-}
-
 
 fg_time_t fgPlatformSystemTime ( void )
 {
@@ -298,7 +278,7 @@ static const char* fghColormapStateToString( int state )
     }
 }
 
-static void fghPrintEvent( XEvent *event )
+__fg_unused static void fghPrintEvent( XEvent *event )
 {
     switch( event->type ) {
 
@@ -628,10 +608,11 @@ void fgPlatformProcessSingleEvent ( void )
         switch( event.type )
         {
         case ClientMessage:
-            if(fgIsSpaceballXEvent(&event)) {
-                fgSpaceballHandleXEvent(&event);
-                break;
-            }
+            if (fgStructure.CurrentWindow)
+                if(fgIsSpaceballXEvent(&event)) {
+                    fgSpaceballHandleXEvent(&event);
+                    break;
+                }
             /* Destroy the window when the WM_DELETE_WINDOW message arrives */
             if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.pDisplay.DeleteWindow )
             {