X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_window_x11.c;h=6f927c2c454facefc057430fde7e62f6384a51f5;hb=9a1ee9315ae988fd16d4360fe99aa562de6a94ba;hp=61a3bd6cd1d63012b96ccdc0951b841c1affc517;hpb=e45a69b97f088c2b10ee2faba04e863692afc9f8;p=freeglut diff --git a/src/x11/fg_window_x11.c b/src/x11/fg_window_x11.c index 61a3bd6..6f927c2 100644 --- a/src/x11/fg_window_x11.c +++ b/src/x11/fg_window_x11.c @@ -32,6 +32,8 @@ #include /* 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 ) @@ -421,6 +443,8 @@ void fgPlatformGlutIconifyWindow( void ) XIconifyWindow( fgDisplay.pDisplay.Display, fgStructure.CurrentWindow->Window.Handle, fgDisplay.pDisplay.Screen ); XFlush( fgDisplay.pDisplay.Display ); /* XXX Shouldn't need this */ + + fgStructure.CurrentWindow->State.Visible = GL_FALSE; } /*