[RFC] kscreen and touchscreen rotation

Martin Flöser mgraesslin at kde.org
Mon Sep 11 19:12:12 UTC 2017


Am 2017-09-11 17:11, schrieb Sebastian Kügler:
> On Monday, September 11, 2017 4:49:58 PM CEST Martin Flöser wrote:
>> So go for the simple way and change Wayland first.
> 
> Do you think the architecture / API approach is sound?

I think your API idea covers all cases. What might be important is to 
especially focus on the case of:
* internal display with touch screen
* attaching external display

This is a common use case which currently has it's problems as the 
touchscreen coordinates are not properly translated. This is something 
we need to get right no matter whether we want to rotate the screen or 
not.

Given that it would be important to have some meta information about how 
the touch screen relates to a physical screen, e.g. the layout in the 
virtual display. So add a pointer back from the touchscreen to the 
physical screen.

For the Wayland case we hopefully don't need any of the API. KWin should 
do a sane thing without needing KScreen for it. If we have the link 
between physical screen and touch screen KWin should do the only sane 
thing when rotating the physical screen.

Btw. on Wayland KWin has all relevant information about the devices 
exposed through DBus and you can use that from KScreen side. If 
something is not yet exposed, just yell, it's easy to add.

org.kde.KWin /org/kde/KWin/InputDevice/eventXX

and then check the properties. Most important for you should be:
* bool touch
* QSize size
* QString outputName
* bool supportsCalibrationMatrix
* bool enabled

This is mostly just forwarding of libinput device configuration state. 
For more information about these: 
https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#ga09a798f58cc601edd2797780096e9804

The link is directly for set calibration matrix, which would be the way 
to go for rotating a touch screen.

Cheers
Martin


More information about the Plasma-devel mailing list