X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_window_x11.c;h=61a3bd6cd1d63012b96ccdc0951b841c1affc517;hb=757e1ba2f548e903b960b19a39c3752a3be621f7;hp=1b90bf55c5922eaec8b237e6a102910ae0c112d6;hpb=0e653a9d94fec583f7a4172b721c1c599e06cbc8;p=freeglut diff --git a/src/x11/fg_window_x11.c b/src/x11/fg_window_x11.c index 1b90bf5..61a3bd6 100644 --- a/src/x11/fg_window_x11.c +++ b/src/x11/fg_window_x11.c @@ -133,6 +133,7 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title, 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 ) ) @@ -239,6 +240,18 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title, &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