Diffusion KWin 68698b42012c

[libinput] Find screen for touch screen devices and calibrate accordingly

Authored by graesslin on Nov 10 2017, 5:07 PM.

Description

[libinput] Find screen for touch screen devices and calibrate accordingly

Summary:
This change finds the screen for a touch screen device based on:

  • number available screens
  • output name defined on the touch screen device
  • internal screen
  • and physical size

The id of the screen is stored in the Device allowing to adjust the
touch points accordingly. This means instead of transferring to the
combined display size the touch points are transferred into the output
space and the position of the output is added. Thus in a multi screen
system the touch points are properly mapped to the output.

Furthermore the screen orientation is passed to the Device and a
calibration matrix is set accordingly. Thus a transformed screen has the
touch screen transformed accordingly.

Please note that this only affects libinput on Wayland and not on X11!
The x11 standalone platform needs to gain similar code.

Reviewers: KWin, Plasma

Subscribers: plasma-devel, kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D8748