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?

  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@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to