Problem with extension input events from several devices



I'm having a problem using extension input events from several devices simultaneously:

I'm writing a 3D modeler using gtk+ and OpenGL, and I'm using two input
devices: a mouse (pointer device) and a trackball (XInput extension device).

I'm using the mouse to draw on top of a 3D surface, and the trackball is being
used to rotate the surface.

In the past I created a similar solution using Xt/Xaw, but now that I moved to
gtk+/gnome, I'm having this problem:

Every time I enable the extension input events from the trackball, I stop receiving events from the pointer device (mouse):

Sample code:

gtk_widget_set_extension_events( drawing_area, GDK_EXTENSION_EVENTS_ALL );
gdk_input_set_mode( trackball_dev, GDK_MODE_WINDOW );
 

However, every time I disable events from the trackball, the mouse starts sending events again:

gdk_input_set_mode( trackball_dev, GDK_MODE_DISABLED );

Is there any way of receinving events from both devices simultaniously ?
Is this a bug in gtk+ input event processing ?

I'm using gtk+ 1.2.6 from RedHat 6.2.

Thanks in advance,
 

Fernando Pereira

-- 
*******************************************************************************
*                          Fernando J. G. Pereira                             *
*******************************************************************************
 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]