Bug 253392 - qt3 tablet support missing
qt3 tablet support missing
Status: RESOLVED WONTFIX
Classification: openSUSE
Product: openSUSE 10.2
Classification: openSUSE
Component: Other
Final
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-10 15:37 UTC by Martin Pley
Modified: 2007-09-20 15:51 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Pley 2007-03-10 15:37:21 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.
Comment 1 Dirk Mueller 2007-03-12 13:43:06 UTC
d'oh. it seems we can just unconditionally enable it because the extension even exists on 9.3
Comment 2 Martin Pley 2007-03-12 13:56:49 UTC
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?
Comment 3 Dirk Mueller 2007-03-12 14:19:07 UTC
Danny: any idea why the test application doesn't work?
Comment 4 Danny Al-Gaaf 2007-03-12 14:25:17 UTC
No, But I also don't know which test application. Is there any code?
Comment 5 Martin Pley 2007-03-12 14:47:28 UTC
Yes, in package qt3-examples:

/usr/lib/qt3/doc/examples/tablet/

Or just use QWidget and reimplement tabletEvent.
Comment 6 Dirk Mueller 2007-03-12 14:52:17 UTC
.. with a fixed qt3 (Factory only for now)
Comment 7 Dirk Mueller 2007-03-22 10:52:38 UTC
ping.. if you have any hardware I could borrow, I'd take a look myself
Comment 8 Dirk Mueller 2007-03-29 16:27:32 UTC
ping...
Comment 9 Dirk Mueller 2007-04-12 15:32:25 UTC
ping...
Comment 10 Martin Pley 2007-04-12 22:38:55 UTC
pong.

Found the "Bug". Will write about the details on tomorrow.
Comment 11 Martin Pley 2007-04-13 08:48:11 UTC
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. )
Comment 12 Dirk Mueller 2007-04-13 11:04:49 UTC
ugh, that code is not pretty. 

Markus: what do you suggest to detect such devices?

Comment 13 Martin Pley 2007-04-13 11:16:48 UTC
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"?
Comment 14 Marcus Schaefer 2007-04-26 08:14:16 UTC
sorry I can't change sax to use other Identifiers than "Mouse[n]"
for input devices. This would break everything in sax
Comment 15 Stefan Dirsch 2007-05-12 10:28:14 UTC
Egbert, JFYI. Since Matthias or me is in Cc of this bugreport or the reported itself, it might be interesting for you as well.
Comment 16 Stefan Dirsch 2007-05-12 10:42:28 UTC
JFYI, Matthias. This is a bugreport, which is assigned to Egbert/me or with Egbert/me in CC or reported by Egbert/me.
Comment 17 Lubos Lunak 2007-05-21 16:09:54 UTC
Markus: You haven't answered the question in comment #12: What do you suggest to detect such devices?
Comment 18 Marcus Schaefer 2007-05-22 08:10:05 UTC
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
Comment 19 Dirk Mueller 2007-05-22 09:55:53 UTC
repeating the question from comment #12 or #17: what do you suggest to detect such devices with sax2 generated configs?

Comment 20 Marcus Schaefer 2007-05-22 10:03:15 UTC
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
Comment 21 Danny Al-Gaaf 2007-05-22 10:09:13 UTC
(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. 

Comment 22 Dirk Mueller 2007-09-20 15:51:19 UTC
reopen if this is reproducible with qt4. we will not develop custom qt3 patches anymore.