[maemo-developers] detect window iconified/maximized in SDL
From: W. de Hoog wdehoog at exalondelft.nlDate: Wed Mar 25 23:39:16 EET 2009
- Previous message: detect window iconified/maximized in SDL
- Next message: detect window iconified/maximized in SDL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: detect window iconified/maximized in SDL
- Next message: detect window iconified/maximized in SDL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
