sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] SDL app keeping focus

Subject: Re: [SDL] SDL app keeping focus
From: Paul Duffy
Date: Thu, 19 Jul 2007 19:29:17 +0100
On Thu, 2007-07-19 at 09:29 -0500, Lilith Calbridge wrote:
> Without my docs at hand I'm just guessing.  Is there an event that
> detects loss of focus?  If so, is there a means to regain the focus?
> 
Yes and maybe.

You can detect loss or gain of focus with:
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fActiveEvent

Now, I haven't tried this but at a guess I'd say using SDL_PushEvent to
drop in the kind of event that would cause the game to automatically
regain focus and raise to the front of the display (like a mouseclick)
would be a good bet.
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fPushEvent

Hope this helps.


        
        
                
___________________________________________________________ 
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease 
of use." - PC Magazine 
http://uk.docs.yahoo.com/nowyoucan.html
_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

<Prev in Thread] Current Thread [Next in Thread>