Dug a bit and found out the origin of the following error:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 135 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Bug hunt led finally to call of XCloseDisplay(dpy) in GLimp_Shutdown() (gl_glx.c) (started from call of VID_Shutdown() in CL_Shutdown (cl_main.c)...
Might be that dpy is not valid display or smthing is not released before trying to release the current display (or the initial state of X is lost)...
I'm not experienced enough to do much more (and if this is strictly xlib related...) so my current fixes are following:
Play the game at the desktop resolution
or
make a startup script that calls xrandr after the execution of ufo. Eg in my case there is only two lines in the script "run_ufo" (remember to: chmod 755 run_ufo ):
./ufo
xrandr -s 1
the "1" is the screen mode I want to change to after the game (invoke simply xrandr to see the available modes...)
Hope that this helps if some one has the same problem...
~S~