Working on a new toolbox, dockers

Adrian Page adrian at pagenet.plus.com
Fri Jun 3 00:33:45 CEST 2005


Boudewijn Rempt wrote:
> I'm working on a new toolbox and trying to finish my new docker scheme at the 
> same time (although implementing text layers based on koText is also grabbing 
> some of my attention...) and I was wondering whether anyone knows how to get 
> a list of pointers known to X. 

KisCanvas::initX11Support() has code that gets the available input 
devices using XListInputDevices(). This is where the tablet support gets 
the information it needs for handling tablet events.

> I'd like to have a docker that shows which pointer (mouse, stylus, puck, 
> eraser) is connected to -- and I want to extend that to using the unique id 
> for each wacom device. 

Unfortunately the unique id as documented in QTabletEvent is not 
supported on Linux due to lack of support in the xorg/XFree86 driver, 
and hence in Qt. In fact, Qt/X11 (non-Irix) only recognises tools by 
name. "stylus" or "pen" is taken to be the one-and-only stylus, and 
"eraser" is taken to be the one-and-only eraser. It doesn't recognise a 
puck at all. This means that if you have more than one stylus, Qt can 
only see one of them as a tablet device. The KisCanvas code also shares 
this limitation at the moment as I haven't yet added the code to 
overcome this.

The xorg/XFree86 driver does allow the unique tool id to be used by 
allowing you to create a separate device for each tool using the 
"Serial" option, and this means we could recognise each tool in its own 
right. We would then use the device's id rather than its name to 
identify it. Because of this, it might make sense to have a 
configuration dialog that lists the available input devices and allows 
the user to select which ones should be treated as tablet devices, very 
much like the input devices configuration in gimp. This is what I had in 
mind for the next step in the tablet support, together with recognition 
of the airbrush's wheel setting.

Adrian


More information about the kimageshop mailing list