← Back to team overview

multi-touch-dev team mailing list archive

Re: tablets and auto-rotation

 

On 02/23/2011 11:26 AM, Ping Cheng wrote:
> On Wed, Feb 23, 2011 at 9:36 AM, Duncan McGreggor <
> duncan.mcgreggor@xxxxxxxxxxxxx> wrote:
> 
>>
>> -------- 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 agree with Alberto on this point. Using something generic, like Xinput,
> rather than vendor/project-specific helps the community in the long term.
> 
>  > > 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.
>>
> 
> Wacom X driver can tell you if the device is a touchscreen, touchpad, or
> tablet. But, as I mentioned above, relying on a specific device/driver would
> only support a limited number of devices. A generic way to tell the type of
> the device helps all devices.
> 
> 
>>> 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
>>
> 
> The good news is that kernel input subsystem has added (maybe not in the
> tree yet, Henrik should be able to tell us more) a new set of ioctl so we
> can retrieve the device types directly from the kernel. With this new ioctl,
> generic "device self-identification" is available.
> 
>  > 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.
>>
> 
> I am with both of you here. We need to enable end users with a one button
> click to enable or disable automatic rotation of input devices in the UI so
> users have choices when they do not want to go with the default setting.
> 
> Ping

Hey Ping!

Thanks for breathing a little life back into this old (and important)
thread.

Chase and I were talking on the phone today, and he was coming up with
some good ideas on how to approach this problem. Perhaps we can entice
him to share with us...

d



References