← Back to team overview

multi-touch-dev team mailing list archive

Re: tablets and auto-rotation

 


-------- Original Message --------
Subject: Re: touch input rotation
Date: Tue, 29 Jun 2010 10:48:49 -0400
From: Rafi Rubin <rafi@xxxxxxxxxxxxxx>
To: Kees Cook <kees.cook@xxxxxxxxxxxxx>
CC: Alberto Milone <alberto.milone@xxxxxxxxxxxxx>,        Federico Mena
Quintero <federico@xxxxxxxxxx>,        Bryce Harrington
<bryce@xxxxxxxxxxxxx>,        Chase Douglas
<chase.douglas@xxxxxxxxxxxxx>,        "Duncan M. McGreggor"
<duncan.mcgreggor@xxxxxxxxxxxxx>,        Rick Spencer
<rick.spencer@xxxxxxxxxxxxx>

On 06/29/10 10:43, Kees Cook wrote:
> Hi Alberto,
>
> On Tue, Jun 29, 2010 at 04:20:56PM +0200, Alberto Milone wrote:
>> On 28 June 2010 20:14, Kees Cook<kees.cook@xxxxxxxxxxxxx>  wrote:
>>> I saw your touch input rotation work[1].  I was looking at this too,
>>> and I think it needs to be done more generally (in gnome-desktop rather
>>> than g-s-d), and with XInput (rather than calling out to xsetwacom).
>>> I've got a patch to do it here:
>>>
>>> https://launchpad.net/bugs/599478
>>> http://launchpadlibrarian.net/51043158/101_rotate-touch-devices.patch
>>
>> According to Rafi (who I'm subscribing) there are cases in which we
>> may not want to auto rotate input devices:
>>
>> "Simply differentiating pen and touch is insufficient.  Most of the
>> wacom touch screens seem to have pen, and we would want to rotate
>> those pens.  We also see devices like the bamboo tablets which
>> identify as touch, but aren't attached to the screen and shouldn't
>> auto rotate. And then there's messes like ntrig devices, where we're
>> moving towards using evdev for touch and the wacom x driver for pen"
>
> I suspected not all "Wacom Tool Type" == "TOUCH" devices would
qualify, but
> I wanted to start somewhere.  I suspect it would be better to have the
> devices self-identify as "attached to screen orientation" or not, so the
> code to find them is simpler.  In the meantime, my struct GnomeXiDetails
> could be extended.  I was treating it as a whitelist currently.
>
>> I think that perhaps using either a blacklist or regular expressions
>> to indentify devices would help. This said, I still think that we
>> can't get this right for all devices, therefore I recommend that we
>> adopt Federico's approach where a gconf key allows users to disable
>> automatic rotation of input devices. This is not enough but at least
>> it should make things less annoying for users who don't want to rotate
>> inputs. We might as well have a text file with the blacklist so that
>> users can add devices that shouldn't rotate there (this would help
>> OEMs a great deal).
>
> Agreed -- having this under more direct control is a win, though it should
> DTRT by default.

Hi, sorry if I'm a bit unresponsive.

wrt blacklisting, I'd suggest that be implemented as setting the
"default", rather than can not enable at all.


The wacom stuff might actually have some bit of information that can be
used to cover a large set of devices one way or the other, though I'm
not really sure what would be the appropriate test.  Probably just best
to ask Ping.

Also, in addition to Kees code, there's Thomas Jaeger's wacomrotate,
which is quite similar (I only bring it up because its tiny, and there
might be some subtle useful bits in the code).

http://github.com/thjaeger/wacomrotate/blob/master/wacomrotate.c  (about
200 lines of low density code).

Rafi



References