[platforms/wayland] Use a ConfinedPointer if available
ClosedPublic

Authored by graesslin on Nov 24 2016, 1:00 PM.

Details

Summary

This supports "grabbing" the pointer on right ctrl key just like on X11.
If the Wayland server supports pointer constraints protocol, the nested
Wayland compositor creates a confined pointer if the right ctrl key is
pressed.

On another right ctrl press the (active) constraint gets removed again.

To indicate the current state the window title gets updated. This also
implements window title support for the first time.

This change implement T4604.

Test Plan

Tested with a modified KWin with server-side pointer constraints support

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 8477.Nov 24 2016, 1:00 PM
graesslin retitled this revision from to [platforms/wayland] Use a ConfinedPointer if available.
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 TranscriptNov 24 2016, 1:00 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
sebas accepted this revision.Dec 5 2016, 1:54 PM
sebas added a reviewer: sebas.
sebas added a subscriber: sebas.

Consider my comment, but up to you. Patch looks good otherwise.

plugins/platforms/wayland/wayland_backend.cpp
574

Plasma perhaps, instead of KDE?

This revision is now accepted and ready to land.Dec 5 2016, 1:54 PM
graesslin added inline comments.Dec 5 2016, 6:02 PM
plugins/platforms/wayland/wayland_backend.cpp
574

It's only the window title of the nested compositor. Given that KDE is the producer and Wayland Compositor is the product I think KDE Wayland Compositor is correct. Otherwise KDE Plasma Wayland Compositor would also be correct.

But as that is mainly intended to NOT run Plasma (nested setup to test things or non-Plasma usage) I think not having Plasma in the title is OK.

sebas added inline comments.Dec 5 2016, 6:03 PM
plugins/platforms/wayland/wayland_backend.cpp
574

Alright, cool. :)

This revision was automatically updated to reflect the committed changes.