gestures are not rotated by evdev coordinate transformation matrix
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grail |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I rotate my screen 180 degrees and touch input along with it by using
xinput set-prop $ID "Coordinate Transformation Matrix" -1.0 0.0 1.0 0.0 -1.0 1.0 0.0 0.0 1.0
gestures are not rotated. That is, the rotation:
* does take effect in QT4's Fingerpaint example (/usr/lib/
* does not take effect for ginn
* does not take effect for libgrip (i'm running several patched applications).
The effect is most apparent when I have two Evince windows side-by-side (Compiz grid) try to two-finger-drag one document up. Then the other document scrolls down.
This is still happening with today's update in natty-proposed (#774938). I attached my package versions.
Changed in utouch-grail: | |
status: | In Progress → Fix Committed |
Changed in xserver-xorg-input-evdev (Ubuntu): | |
status: | New → In Progress |
I investigated this a bit more.
It seems that the coordinate matrix is applied by the x server (in dix/getevents.c), well *after* the x evdev driver is done with the event. The gesture recognition, however, happens in utouch-grail, which is loaded by the x evdev driver, and it happens *before / in parallel* with the evdev driver handling the event. After that, the gesture event follows a codepath quite distinct from the one for touch events, and the coordinate matrix is never applied.
It seems to me quite difficult to apply the coordinate matrix to the gesture events themselves; it would be a nonlinear transformation on the rotation angle, for example. That means that we should apply the coordinate matrix to the touch data, before utouch-grail takes a look at it.
I'm marking this as affecting utouch-grail since that seems to be to most likely place where to fix this. I'm probably not knowledgeable enough to produce a patch.