diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index 4edf90d..3259282 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1021,3 +1021,8 @@ mouse pointers don't work) on the way: using a macro. In addition, this avoids any non-constant initializer issues which might be raised when using WinDoze GCCs. The additional code overhead is negligible, at least for x86 (a few instructions per name). + +(267) When switching to game mode under X11, no ConfigureNotify event +will happen and consequently no reshape callback will ever be called via +the normal mechanism. To fix this, note that the game mode window needs +to be resized and handle this before redraw. diff --git a/freeglut/freeglut/src/freeglut_gamemode.c b/freeglut/freeglut/src/freeglut_gamemode.c index 487117c..087212e 100644 --- a/freeglut/freeglut/src/freeglut_gamemode.c +++ b/freeglut/freeglut/src/freeglut_gamemode.c @@ -435,6 +435,7 @@ int FGAPIENTRY glutEnterGameMode( void ) fgStructure.GameMode->State.Width = fgState.GameModeSize.X; fgStructure.GameMode->State.Height = fgState.GameModeSize.Y; + fgStructure.GameMode->State.NeedToResize = GL_TRUE; fgStructure.GameMode->State.IsGameMode = GL_TRUE; diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index da13c94..5cb91ad 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -104,9 +104,7 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) width, height ); XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */ -#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE - -#if !TARGET_HOST_WINCE +#elif TARGET_HOST_WIN32 { RECT winRect; int x, y, w, h; @@ -156,7 +154,7 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) SWP_NOZORDER ); } -#endif /* TARGET_HOST_WINCE */ +#endif /* * XXX Should update {window->State.OldWidth, window->State.OldHeight} @@ -170,8 +168,6 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) glViewport( 0, 0, width, height ); } -#endif - /* * Force a window redraw. In Windows at least this is only a partial * solution: if the window is increasing in size in either dimension,