Add a PlatformCursorImage to Platform and EffectsHandler
ClosedPublic

Authored by graesslin on Oct 18 2016, 7:05 AM.

Details

Summary

There are several effects (screenshot, zoom) which need access to the
cursor image and cursor hotspot. So far these effects used X11
unconditionally to get the cursor which obviously does not work on
Wayland.

This change adds a new class PlatformCursorImage to kwinglobals which
wraps what a cursor is (image and hotspot) and adds a new virtual method
to Platform to provide such a PlatformCursorImage. By default it's the
cursor image the Platform tracks. On X11/standalone platform this new
virtual method is overriden and provides a PlatformCursorImage from X11
using the code previously used in screenshot effect.

Screenshot effect and zoom are adjusted to use the new API instead of
X11.

Test Plan

Zoom effect tested on Wayland, now gets the proper cursor icon.
X11 functionality not yet tested.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7491.Oct 18 2016, 7:05 AM
graesslin retitled this revision from to Add a PlatformCursorImage to Platform and EffectsHandler.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptOct 18 2016, 7:05 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
mart accepted this revision.Oct 19 2016, 2:38 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Oct 19 2016, 2:38 PM
This revision was automatically updated to reflect the committed changes.