Bugzilla – Bug 253392
qt3 tablet support missing
Last modified: 2007-09-20 15:51:19 UTC
Tablet support is missing in qt3. The build-script.sh of qt3 looks for "XInput.h" in /usr/X11R6/include/X11/extensions/. But it's located in /usr/include/X11/extensions/ provided by xorg-x11-proto-devel package. So the build-script does not enable tablet-support.
d'oh. it seems we can just unconditionally enable it because the extension even exists on 9.3
Yes, the build-script is quite old. :-) But I still don't get any tablet-events. Not even with the example program, which is included in Qt. Gimp detects the correct pressure. And Qt is really compiled with tablet support. (tested with debug enabled Qt and gdb) but QApplication seems not to get any events for the tablet from X11. Any ideas?
Danny: any idea why the test application doesn't work?
No, But I also don't know which test application. Is there any code?
Yes, in package qt3-examples: /usr/lib/qt3/doc/examples/tablet/ Or just use QWidget and reimplement tabletEvent.
.. with a fixed qt3 (Factory only for now)
ping.. if you have any hardware I could borrow, I'd take a look myself
ping...
pong. Found the "Bug". Will write about the details on tomorrow.
The Tablet-Support in Qt only works, if the InputDevices in xorg.conf are called "stylus", "pen" and "eraser" instead of "Mouse[X]", "Mouse[Y]" and "Mouse[Z]". Two possible ways to fix: 1. Modify sax, to set the name of tablet-Devices to "stylus", "pen" and "eraser". 2. Patch qt3 to detect the devices anyway. ( qapplication_x11.cpp:2180 ff. )
ugh, that code is not pretty. Markus: what do you suggest to detect such devices?
Two additional notes: 1. For instance Eraser[0] and Pen[0] would also be detected. 2. There is an "Option InputFashion Eraser" and "Option InputFashion Pen" in the InputDevice Sections for Eraser and Pen. One could look for that entries and set the Identifier as XFREENAMEPEN/ERASER in qapplication_x11.cpp. But I don't know how to do it. Is it possible to do it with "xf86FindOptionValue"?
sorry I can't change sax to use other Identifiers than "Mouse[n]" for input devices. This would break everything in sax
Egbert, JFYI. Since Matthias or me is in Cc of this bugreport or the reported itself, it might be interesting for you as well.
JFYI, Matthias. This is a bugreport, which is assigned to Egbert/me or with Egbert/me in CC or reported by Egbert/me.
Markus: You haven't answered the question in comment #12: What do you suggest to detect such devices?
In reply to comment #11/#12: I'm sorry the Identifier names in sax can't be changed just to make a tablet happy. The Identifier names must follow a specific format in order to allow sax to re-read the file correctly. Maybe it was a bad decision to use the Identifier for building an internal section tree but from a todays perspective this can't be changed without rewriting it completely I'm sorry I will not change the Identifier handling in sax
repeating the question from comment #12 or #17: what do you suggest to detect such devices with sax2 generated configs?
There is already a detection in place: /usr/share/sax/sysp/maps/Input.map 0x056a : 0x0013 : wacom The profile wacom is assigned for this table and will create all relevant sections... but with normal Identifiers. I'm sorry I had only these tablet so this one is the only one which gets detected automatically
(In reply to comment #19) > repeating the question from comment #12 or #17: what do you suggest to detect > such devices with sax2 generated configs? For wacom devices you could check if the driver of the device is 'wacom' and for the special input device you can maybe check for the value of the option "Type" (stylus/cursor/eraser). I don't know how you can access the config values. Maybe via some X-libs. Btw. is this qt-code only for wacom tablets? The point is: there are several other tablets/touchscreens for Tablet PCs available as e.g. devices supported by the fpit, evtouch or fujitsu driver. And they have not the same config scheme as wacom. You can't identify them in the same way.
reopen if this is reproducible with qt4. we will not develop custom qt3 patches anymore.