Re: gtk->deviceid How to use?



From: Lam Yick Yan <haem netvigator com>
>
> Dear Sir,
>
>     I have just devleoped a X input driver for my small graphic tablet.
> And it is working.... Now I have cursor  that will move according to
> mouse OR graphic tablet.
>
>    Now I want to develope a gtk application that will ONLY respond
> the event from my graphic tablet. I have a callback function in my GTK
> application, motion_notify_event and I have compared the event content
> of my mouse and my graphic tablet and they look the same (the deviceid
> content etc). and I have no way to distuguish whether the event is from the
> mouse or from the graphic tablet.
>
>    What did I do wrong in my driver? can please have a look at
> http://input.foruto.com/IME/BINARIES/gogopen.tar.gz and tell me whether
> I did wrong in the device driver?

You should (I think), in principle, be able to distinguish them using
the GdkInputSource (GDK_SOURCE_MOUSE vs GDK_SOURCE_PEN). If the
tablet isn't giving events as GDK_SOURCE_PEN, look at the gdk source
code and see how gdk determines this information from the XEvent,
and make sure your driver is giving the proper information to X.

Ron Steinke

P.S. This is _way_ out of my area of expertise, someone please correct
me if I'm wrong.



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