[RFC] kscreen and touchscreen rotation

Martin Flöser mgraesslin at kde.org
Mon Sep 11 14:53:28 UTC 2017


Am 2017-09-11 12:56, schrieb David Edmundson:
> On Mon, Sep 11, 2017 at 11:58 AM, Sebastian Kügler <sebas at kde.org>
> wrote:
> 
>> Hi all,
>> 
>> One of the things we talked about during Akademy was better support
>> for
>> convertible hardware. I've played around a bit with my Thinkpad X1
>> Yoga
>> and screen rotation. I can of course rotate the screen "manually"
>> through XRandR (Wayland is another story on that altogether), but
>> that
>> will screw up the touchscreen. Doing some research, I found out
>> that:
>> 
>> - touchscreen and display are completely separate things, the system
>> doesn't know they're sitting on top of each other
>> - They need to be rotated separately
>> - rotation in X goes through XInput2, on Wayland, I don't know
> 
> on wayland
> 
> touch is libinput->kwin->app  (protocol is wl_touch)
> 
> But AFAIK actual screen rotation itself needs to be added to kwin
> wayland, before we can be looking at fixing touch events.

It's mutual exclusive. We can make touch rotation work without needing 
visual rotation and vice versa. Rotating visual should be quite simple 
in fact.

> 
> I'm not 100% sure the input needs transforming when rotated. If you
> look at QtWaylandWindow when the screen rotates, the surface rotates
> too, so if co-ordinates are surface local we shouldn't be changing it?

Yep it needs to be transformed in KWin otherwise things like touch on 
windeco would not work ;-)

Cheers
Martin


More information about the Plasma-devel mailing list