[maemo-developers] Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
From: Eero Tamminen eero.tamminen at nokia.comDate: Wed May 12 17:28:58 EEST 2010
- Previous message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Next message: Audio Routing API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Hamalainen Kimmo (Nokia-D/Helsinki) wrote: > On Sun, 2010-05-02 at 13:26 +0200, ext Till Harbaum / Lists wrote: >> i'd like to access the zoom keys in a SDL/SDL_gles app (the 3d globe >> i uploaded to extras-devel). >> >> The odd thing is that my solution only partly works. Some key presses actually >> reach my app as function key presses, but still most of them reach the volume >> control. So when repeatedly pressing the zoom buttons my app zooms but also >> the volume is changed. >> >> I am using the following code which is inspired by code from scummvm. I am >> calling this code once immediately after the SDL setup is done. >> >> Any idea why this still delivers some key events to the volume control? > > It could be that _NET_ACTIVE_WINDOW or MB_CURRENT_APP_WINDOW on the root > window does not correspond to your window. The volume app is tracking > one of these (I think _NET_ACTIVE_WINDOW) to determine the window whose > ZOOM_KEY window property matters. Maemo SDL doesn't seem to set all required window properties for fullscreen windows for tracking of the topmost application to work properly. See this bug: https://bugs.maemo.org/show_bug.cgi?id=6175#c3 "xprop -root" produces this when there's a fullscreen SDL window: _NET_ACTIVE_WINDOW(WINDOW): window id # 0x3e00002 _MB_CURRENT_APP_WINDOW(WINDOW): window id # 0x3e00001 I.e. for SDL applications the value in these properties differ, unlike for normal applications. _MB_CURRENT_APP_WINDOW is the fullscreen SDL window and _NET_ACTIVE_WINDOW is the non-fullscreen SDL window. (I think SDL uses fullscreen window for output and non-fullscreen one for input.) - Eero
- Previous message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Next message: Audio Routing API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]