[maemo-developers] detect window iconified/maximized in SDL
From: Kimmo Hämäläinen kimmo.hamalainen at nokia.comDate: Wed Mar 25 10:23:17 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 ]
On Wed, 2009-03-25 at 09:14 +0100, Hamalainen Kimmo (Nokia-D/Helsinki) wrote: > On Tue, 2009-03-24 at 22:23 +0100, ext W. de Hoog wrote: > > Hi, > > > > I would like to detect when an SDL application gets iconified. Than I > > can pause it to save power. In theory the SDL_ACTIVEEVENT should be > > generated and event.active should give me the info I need however I do > > not get these type of events. > > > > Anybody know of how to get the correct events or another way to detect > > the iconification? 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. BR; Kimmo > In Diablo, you can probably receive notification when WM_STATE changes > to IconicState > (WM_STATE is described in > http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1) > somehow with SDL. > > In Fremantle, we are not using the iconic state and you need to track > _MB_CURRENT_APP_WINDOW property on the root window to see if you are > visible. I think SDL knows nothing of this property, but maybe the > support could be added there... > > -Kimmo > > > > > regards, > > > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers
- Previous message: detect window iconified/maximized in SDL
- Next message: detect window iconified/maximized in SDL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]