#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
XEvent eventReturnBuffer; /* return buffer required for a call */
unsigned long mask;
unsigned int current_DisplayMode = fgState.DisplayMode ;
+ XConfigureEvent fakeEvent = {0};
/* Save the display mode if we are creating a menu window */
if( window->IsMenu && ( ! fgStructure.MenuContext ) )
&winAttr
);
+ /* Fake configure event to force viewport setup
+ * even with no window manager.
+ */
+ fakeEvent.type = ConfigureNotify;
+ fakeEvent.display = fgDisplay.pDisplay.Display;
+ fakeEvent.window = window->Window.Handle;
+ fakeEvent.x = x;
+ fakeEvent.y = y;
+ fakeEvent.width = w;
+ fakeEvent.height = h;
+ XPutBackEvent(fgDisplay.pDisplay.Display, (XEvent*)&fakeEvent);
+
/*
* The GLX context creation, possibly trying the direct context rendering
* or else use the current context if the user has so specified
/*
+ * 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 )