← 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 07:43:56 -0700
From: Kees Cook <kees.cook@xxxxxxxxxxxxx>
Organization: Canonical
To: Alberto Milone <alberto.milone@xxxxxxxxxxxxx>
CC: 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>,        Rafi Rubin <rafi@xxxxxxxxxxxxxx>

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.

-Kees

-- 
Kees Cook
Ubuntu Security Team



Follow ups

References