X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_window_x11.c;h=61a3bd6cd1d63012b96ccdc0951b841c1affc517;hb=af62290f3095ea8586ab38d49d924d572e42faa5;hp=2b9012c5c4931c9a858777ecdec48690dda33285;hpb=b744f1401b990f642e96d4c65cc86eca5224efd1;p=freeglut diff --git a/src/x11/fg_window_x11.c b/src/x11/fg_window_x11.c index 2b9012c..61a3bd6 100644 --- a/src/x11/fg_window_x11.c +++ b/src/x11/fg_window_x11.c @@ -132,8 +132,8 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title, XWMHints wmHints; XEvent eventReturnBuffer; /* return buffer required for a call */ unsigned long mask; - int num_FBConfigs, i; 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 ) ) @@ -240,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