Diffusion KWin 4bfeeb3084a5

[platforms/drm] Fix cursor hotspot for inverted landscape rotation

Authored by graesslin on Nov 5 2017, 4:09 PM.

Description

[platforms/drm] Fix cursor hotspot for inverted landscape rotation

Summary:
This change fixes the hotspot calculation by introducing a dedicated
matrix to map the hotspot.

To better test the hotspot a small test application is added. The app
renders a red point at the cursor position and uses a cross for cursor
with the hotspot position being transparent. So if KWin renders the
cursor at the correct position a red point is visible in the center of
the cross. The test app supports several cursor hotspot positions:

  • center (default)
  • top left
  • top right
  • bottom right
  • bottom left

To switch between the variants press the space key.

Test Plan:
Rotated screen, used test app to verify the hotspot is
correct. Also scaled display, still correct

Reviewers: KWin, Plasma

Subscribers: plasma-devel, kwin

Tags: KWin

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