SDL 1.3 SetFullscreen Problem

Running Windows 7, there’s a serious problem with toggling fullscreen when using SDL as an OpenGL context either via deleting and recreating the window/context OR using SDL_SetWindowFullscreen. I can get it working fine most of the time, but for some reason toggling to fullscreen mode while the desktop is the next active window completely crashes SDL.

I checked and the same problem exists in the testgl and testgl2 projects distributed with SDL. To reproduce the error, run the program, then use alt-tab or windows key + D to switch to the desktop. Then, switch back to the SDL/OpenGL window and attempt to toggle on fullscreen. The context initialization won’t openly fail or produce any error messages, but the window will just automatically lose focus and minimize instead of fullscreen.

This seems to mess up the OpenGL capabilities of the entire computer for the next few minutes; even restart the program won’t get it working properly again for a little while. I’m not sure what could be causing this, I’ve spent nearly a day attempting to debug it and I’m no better off than when I started.

Let me know if you need any more specific details reproducing the error.

Okay, a bit more information: SDL doesn’t crash or get corrupted when this happens. However, it still remains true that fullscreen mode after using alt-tab to desktop doesn’t actually work. The program gains focus and then immediately loses focus and minimizes itself. The only way to fix this is to open some other full screen window that obscures the desktop and then try again.

Can you please report this as a bug in bugzilla for tracking?
http://bugzilla.libsdl.org/

Thanks!On Fri, Apr 8, 2011 at 12:33 AM, cmc5788 wrote:

Running Windows 7, there’s a serious problem with toggling fullscreen
when using SDL as an OpenGL context either via deleting and recreating the
window/context OR using SDL_SetWindowFullscreen. I can get it working fine
most of the time, but for some reason toggling to fullscreen mode while the
desktop is the next active window completely crashes SDL.

I checked and the same problem exists in the testgl and testgl2 projects
distributed with SDL. To reproduce the error, run the program, then use
alt-tab or windows key + D to switch to the desktop. Then, switch back to
the SDL/OpenGL window and attempt to toggle on fullscreen. The context
initialization won’t openly fail or produce any error messages, but the
window will just automatically lose focus and minimize instead of
fullscreen.

This seems to mess up the OpenGL capabilities of the entire computer for
the next few minutes; even restart the program won’t get it working properly
again for a little while. I’m not sure what could be causing this, I’ve
spent nearly a day attempting to debug it and I’m no better off than when I
started.

Let me know if you need any more specific details reproducing the error.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Can you please report this as a bug in bugzilla for tracking?
http://bugzilla.libsdl.org/

Thanks!

Running Windows 7, there’s a serious problem with toggling fullscreen when using SDL as an OpenGL context either via deleting and recreating the window/context OR using SDL_SetWindowFullscreen. I can get it working fine most of the time, but for some reason toggling to fullscreen mode while the desktop is the next active window completely crashes SDL.

but this could be a bug in Windows. I have seen all sorts of weird behaviour
for example a game I play always minimises itself after startup
(Windows Vista on Mac).On 09/04/2011, at 1:29 PM, Sam Lantinga wrote:

On Fri, Apr 8, 2011 at 12:33 AM, cmc5788 wrote:


john skaller
@john_skaller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That could really be the matter.

Had some tries on Win7 and just got freaked out by the behavior of
"windows" in windows.

Tried turning of the Aero windowmanager thing ?
Would be worth a shot.On 04/09/2011 09:01 AM, john skaller wrote:

On 09/04/2011, at 1:29 PM, Sam Lantinga wrote:

Can you please report this as a bug in bugzilla for tracking?
http://bugzilla.libsdl.org/

Thanks!

On Fri, Apr 8, 2011 at 12:33 AM, cmc5788 wrote:
Running Windows 7, there’s a serious problem with toggling fullscreen when using SDL as an OpenGL context either via deleting and recreating the window/context OR using SDL_SetWindowFullscreen. I can get it working fine most of the time, but for some reason toggling to fullscreen mode while the desktop is the next active window completely crashes SDL.

but this could be a bug in Windows. I have seen all sorts of weird behaviour
for example a game I play always minimises itself after startup
(Windows Vista on Mac).


john skaller
skaller at users.sourceforge.net


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNoCGSAAoJEEJ3EW1qSL9zV8sQAJIclJBvtdicXYzCsrYqOVQM
UUl1GRVea+lKgiwn7PBYiAVIs4UQinXmOO8H6vkK8jBPIvuXEeZWGuK/9GVhONdI
HscpMbttfUB/5mEh042bnM/6DjCjaV0jKpN2H0K5h9jxvHhl/iii34hy9NDY7No/
kgOYlLMLCmeHdkUu5ZBUzVZwRhNXUt7J0wNB8C1t8KhhrRps/9bJQEK09EsAsvyJ
LyUnuprcyO666kKQFyd5fLQPuuqtrsAlWxwcvI9kODMmkd892Bt0n13/z1eHoAlO
+rAZCc20/W0DlKbu0y2Hd3nBIYUIe99cRkstGOGZh5xStx01NdeGGpR/cyzYK1oU
jSGNdnUoC6R/DyfosZGMnLD5TEpat98Nl2HYQAweVAGClAB3oN66xr4piAm99VJ+
uel4/SnghrSI8RUGl+88VFzHsWjVtYTNn7k3V0LYUdjdjXluM2NvTq2wQ7THgLTQ
t0hPNXACTqPOU9djxwU9SvBs/QaGawM9KrMfuSLLjh8guIigUXU4+VbasF1vFWf1
SxhkQnkfE77S2zBKMdJtKrdh3iZF10SHuxnaq4AIGgpLic/bqPOtL60FPigWeGL3
73+N0sCUiRrNO0rLhNi8BCy9T9Q5lul2ElSTphPmAwYDE6fbVxdzjRKZNRZR8PHt
3e6grMtKnsFY1ehbBI+L
=0O8D
-----END PGP SIGNATURE-----

It’s not a windows-specific bug, I don’t think. For instance, the OpenGL demo here:

http://www.dhpoware.com/demos/gl3ContextCreation.html

manages fullscreen toggling just fine. I’ve been looking into the windows-specific code behind the toggle, and if I find anything I’ll post back. It’s likely that SDL isn’t properly handling fullscreen toggle at the moment.