[maemo-developers] Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
From: Kimmo Hämäläinen kimmo.hamalainen at nokia.comDate: Mon May 3 13:43:54 EEST 2010
- Previous message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Next message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2010-05-02 at 13:26 +0200, ext Till Harbaum / Lists wrote:
> Hi,
>
> 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.
-Kimmo
>
> SDL_SysWMinfo info;
> SDL_VERSION(&info.version);
> if ( SDL_GetWMInfo(&info) ) {
>
> /* We use the SDL GFX display (we're using the GFX window too after all) */
> Display *dpy = info.info.x11.display;
> unsigned long val = 1;
> Atom atom_zoom = XInternAtom(dpy, "_HILDON_ZOOM_KEY_ATOM", 0);
> info.info.x11.lock_func();
> Window win = info.info.x11.window;
> XUnmapWindow(dpy,win);
> XChangeProperty (dpy,win,atom_zoom,XA_INTEGER,32,PropModeReplace,(unsigned char *) &val,1);
> XMapWindow(dpy,win);
> info.info.x11.unlock_func();
> }
>
> Till
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
- Previous message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Next message: Howto grab all Maemo5 zoom key events in SDL/SDL_gles app?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
