How to determine device responsible for CorePointer event from withinclient?
Troy Yee
troystoy at shaw.ca
Mon Dec 18 21:53:29 PST 2006
Thanks for the info Peter. I've already gone down this route and
believe I can make it work... it just seems overly complicated for what
I thought would be relatively straight forward. I was hoping there was
something I was missing that would make the solution much cleaner.
Troy.
On Tue, 2006-12-19 at 14:19 +1030, Peter Hutterer wrote:
> On 19/12/2006, at 13:44 , Troy Yee wrote:
> > For some X-client applications, having the touchscreen behave like the
> > mouse is exactly what is desired. But I also have X-client
> > applications
> > that should ignore touchscreen input but not mouse input. Some X-
> > client
> > applications also want to selectively ignore touchscreen input and
> > to be
> > able to distinguish mouse motion from touchscreen motion.
> >
> > I had hoped that the event handler would be able to determine the
> > device
> > from which an event originated but I have not found a way to do this
> > yet. Can anyone point me in a direction that will allow for this
> > selective client behaviour?
>
> google for tutorials on the X Input Extension or XI.
> Some starting points (for Xlib)
> XListInputDevices
> XOpenDevice
> DeviceMotionNotify
> DeviceButtonPress
> DeviceButtonRelease
>
> The events you will get are (depending what masks you use)
> XDeviceMotionEvents, which have a deviceid.
> Core pointer events just don't have a device id attached to them.
>
> Cheers,
> Peter
>
> --
> Multi-Pointer X Server
> http://wearables.unisa.edu.au/mpx
>
>
More information about the xorg
mailing list