Skip to content
 

SDL Windowed Fullscreen (no mouse trapping)

The fullscreen display mode in SDL traps the mouse on one X display, which can be undesirable if you are running dual head with separate X screens and using SDL for something other than games.

UPDATE: An even easier way of doing this is passing SDL_NOFRAME to SDL_SetVideoMode with width and height set to the full screen size.

To get fullscreen without mouse trapping, you can tell the window manager to set the fullscreen property on the SDL app’s window. I’ve created a simple demo app to experiement with this – see my Projects page for details.

Leave a Reply