How to determine device responsible for CorePointer event from withinclient?
Peter Hutterer
mailinglists at who-t.net
Mon Dec 18 19:49:43 PST 2006
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