Hi,

> BTW. another, perhaps a simpler, way with SDL is to track the FocusOut
> and FocusIn events. I think our pre-installed games do that. So when
> your window has the focus, run it, otherwise keep it paused.
When I listen to SDL_SYSWMEVENT I get xevent type 33 when I switch to my 
app or switch away from it (the app is fullscreen only). The data seems 
always to be 0 so I do not know if focus is in or out.

Code I use:

case SDL_SYSWMEVENT:
         printf("Xevent: %d:%d", event.syswm.msg->event.xevent.type, 
event.syswm.msg->event.xevent.xclient.format);
         printf(" %d:%d", 
event.syswm.msg->event.xevent.xclient.data.b[0], 
event.syswm.msg->event.xevent.xclient.data.s[0]);
         printf(" %d\n", 
event.syswm.msg->event.xevent.xclient.message_type);


output is:

Xevent: 33:8 0:0 327
Xevent: 33:8 0:0 327

-- 
Willem-Jan de Hoog
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to