Take file descriptor only instead of whole KWayland Display

Authored by romangg on Mar 15 2020, 9:45 PM.

Description

Take file descriptor only instead of whole KWayland Display

Summary:
The current KScreenLocker expects the Compositor to hand over the
KWayland::Server::Display pointer.

This has several disadvantages:

  • In KScreenLocker functionality is duplicated which the compositor probably has setup already (creating client connections manually).
  • The Display object has a way larger scope than what KScreenLocker actually needs.
  • Ownership of the Display is unclear in regards to memory but also what the compositor is still allowed to do in comparision to KScreenLocker with the Display.
  • KScreenLocker can only be integrated in compositors using KWayland for managing their wl_display protocol object.

Instead it is now enough to hand over a single file descriptor KScreenLocker
can use as its client endpoint to talk to the compositor.

Test Plan: Manually in Wayland session, autotest.

Reviewers: Plasma, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: apol

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

Details

Committed
romanggMar 28 2020, 9:41 PM
Reviewer
Plasma
Differential Revision
D28082: Take file descriptor only instead of whole KWayland Display
Parents
R133:c893e333b060: Populate Greeter process exit stderr
Branches
Unknown
Tags
Unknown