After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652247 - Always rotate touchscreen input in single monitor
Always rotate touchscreen input in single monitor
Status: RESOLVED DUPLICATE of bug 709600
Product: gnome-settings-daemon
Classification: Core
Component: xrandr
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
touch 3.10
Depends on:
Blocks:
 
 
Reported: 2011-06-09 23:19 UTC by Bastien Nocera
Modified: 2014-02-14 01:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2011-06-09 23:19:28 UTC
No point in doing it any other way.

We should really find out a way to match XRandR outputs and input devices though.
Comment 1 Bastien Nocera 2011-06-09 23:19:49 UTC
Peter, if you have an idea about the latter, it would be much appreciated.
Comment 2 Peter Hutterer 2011-06-10 00:50:57 UTC
right now, you'd have to use the driver-specific rotation options. a set of patches for generic rotation is queued, but it probably won't hit until server 1.12.

evdev has Evdev Axis Inversion and Evdev Axis Swap, Wacom has Wacom Rotation. The problem is identifying touchscreens. Most will have XI_TOUCHSCREEN as type, but wacom uses types of "STYLUS", "ERASER", "PAD", "TOUCH", and "CURSOR". Plus, there is no straightforward way yet to know if a wacom tablet was built-in.

For now, ignoring wacom is probably the best idea until we have a LUT for each device model
Comment 3 Bastien Nocera 2011-06-10 01:08:44 UTC
(In reply to comment #2)
> right now, you'd have to use the driver-specific rotation options. a set of
> patches for generic rotation is queued, but it probably won't hit until server
> 1.12.

That's fine, we can change that code in the future.

FWIW, the code implementing that is already in http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/xrandr/gsd-xrandr-manager.c#n1350

> evdev has Evdev Axis Inversion and Evdev Axis Swap, Wacom has Wacom Rotation.
> The problem is identifying touchscreens. Most will have XI_TOUCHSCREEN as type,
> but wacom uses types of "STYLUS", "ERASER", "PAD", "TOUCH", and "CURSOR". Plus,
> there is no straightforward way yet to know if a wacom tablet was built-in.
> 
> For now, ignoring wacom is probably the best idea until we have a LUT for each
> device model

Done.

But that's not quite what I asked :)

For touchscreen devices that use evdev as the driver, we'd really like to know which XRandR output they're attached to, so can know whether to rotate them as well, or not. Right now, the only way to be 100% sure is to only rotate input devices when there's just one output.
Comment 4 Peter Hutterer 2011-06-10 02:08:50 UTC
I'm not sure you'll like this answer :)
We don't map to an output, we map to an area on the screen. That area is defined by the transformation matrix of the device (which uses a range of 0..1 for width/height mapping).

A device is mapped to a particular output if the transformation matrix happens to coincide with the output. e.g. if you have two identical monitors and the matrix claims the device is mapped to 50% of the screen at an offset of 50%, the device is effectively mapped to the right screen. You need to extract that from the matrix.

http://wiki.x.org/wiki/XInputCoordinateTransformationMatrixUsage
http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Dual_and_Multi-Monitor_Set_Up
Comment 5 Carlos Garnacho 2014-02-14 01:39:40 UTC
The patches in #709600 address the issue at hand here, so closing this bug as a dup.

*** This bug has been marked as a duplicate of bug 709600 ***