My game sets its window title with SDL_WM_SetCaption() immediately after
calling SDL_SetVideoMode(). I noticed months ago that the window stays
’Untitled’ about 1 time in 4.
Here’s the change to fix the cause - X11_CreateWindow() only waits for the
window to be mapped in full-screen mode and forgets to do it for ordinary
windows.
$ diff -c old/src/video/x11/SDL_x11video.c new/src/video/x11/SDL_x11video.c
*** old/src/video/x11/SDL_x11video.c Sat Jul 7 08:59:37 2001
— new/src/video/x11/SDL_x11video.c Mon Aug 27 15:11:24 2001***************
*** 850,858 ****
if ( ! SDL_windowid ) {
XMapWindow(SDL_Display, SDL_Window);
XMapWindow(SDL_Display, WMwindow);
if ( flags & SDL_FULLSCREEN ) {
screen->flags |= SDL_FULLSCREEN;
-
X11_WaitMapped(this, WMwindow); X11_EnterFullScreen(this); } else { screen->flags &= ~SDL_FULLSCREEN;
— 850,858 ----
if ( ! SDL_windowid ) {
XMapWindow(SDL_Display, SDL_Window);
XMapWindow(SDL_Display, WMwindow);
-
X11_WaitMapped(this, WMwindow); if ( flags & SDL_FULLSCREEN ) { screen->flags |= SDL_FULLSCREEN; X11_EnterFullScreen(this); } else { screen->flags &= ~SDL_FULLSCREEN;
Ta.
–
Lee Haywood.