Added subwindows to CallbackMaker demo, for testing and demonstration. Also figured...
[freeglut] / src / x11 / fg_window_x11.c
index 61a3bd6..2afe99e 100644 (file)
@@ -32,6 +32,8 @@
 #include <unistd.h>  /* usleep */
 #include "../fg_internal.h"
 
+extern void fghRedrawWindow(SFG_Window *window);
+
 #ifdef EGL_VERSION_1_0
 #include "egl/fg_window_egl.h"
 #define fghCreateNewContext fghCreateNewContextEGL
@@ -370,6 +372,26 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title,
 
 
 /*
+ * Request a window resize
+ */
+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 ) ;
+}
+
+
+/*
  * Closes a window, destroying the frame and OpenGL context
  */
 void fgPlatformCloseWindow( SFG_Window* window )