Release window focus?

Hi,

Is there a way to make an SDL window (running on X) automatically (that
is without clicking with mouse on the other windows) release the focus
and keyboard input to an other window when passing from the fullscreen
mode to the windowed mode ?

Thanks in advance.

Nabil

Hi,

Is there a way to make an SDL window (running on X) automatically (that
is without clicking with mouse on the other windows) release the focus
and keyboard input to an other window when passing from the fullscreen
mode to the windowed mode ?

Do you mean change focus to a specific window? Yes, but you need to use
the system dependent interface in SDL_syswm.h. See the FAQ for an example
of using X calls in an SDL program.

SDL automatically releases the mouse and keyboard when switching from
fullscreen to windowed mode if you haven’t set SDL_GrabInput(SDL_GRAB_ON)

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software