Rewrite kworkspace logout, shutdown and suspend API

Authored by davidedmundson on Jul 2 2019, 4:19 PM.

Description

Rewrite kworkspace logout, shutdown and suspend API

Summary:
The old code path is old and even sometimes uses the ICE protocol to
start a logout from ksmserver. It's quite archaic and unreadable,
KDisplayManager is even worse.

The new code consists of two parts.

A QML friendly front end QObject that we can register in a plugin that
can trigger actions such as prompting a logout or suspending the system
and a singleton that talks to the relevant backend.

Backends are:

  • Any logind interface
  • Consolekit2
  • Consolekit0.4 + UPower

New API loading is also entirely asyncronous.

There are some behavioural changes:

  • Creating a logout prompt is called directly instead of going via

ksmserver. The prompt then calls into ksmserver when accepted

  • Suspend is called directly instead of going via powerdevil through

some kdelibs4support solid code.

All DBus calls use generated XML files, instead of big QDBusMessage
commands. It's a bit overkill in terms of what we generate, but that's
ready for moving SessionModel in here and killing KDisplayManager.

Patch looks huge because of all the XML files, but is otherwise very
simple.

It is not currently an API break.

Test Plan:
Ran sessionstest on my logind machine
A BSD user tested CK1

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: pino, broulik, plasma-devel

Tags: Plasma

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

Details

Committed
davidedmundsonJul 2 2019, 4:24 PM
Reviewer
Plasma
Differential Revision
D19389: Rewrite kworkspace logout, shutdown and suspend API
Parents
R120:50c391cc6c1b: taskmanager: performance
Branches
Unknown
Tags
Unknown