I am writing a game (FPS-style) using SDL that I would like to run in windowed mode. I would like to trap the mouse cursor in the window, but I would like to be able to alt-tab out of the game, so I would like keyboard input to still run through the window manager before the game sees it. I am running linux.
Currently I have the following in my code:
SDL_WM_GrabInput ( SDL_GRAB_ON );
This successfully grabs the mouse, but also grabs the keyboard and my window manager's alt-tab is not working.
Any solutions?