D19389: [WIP] Rewrite kworkspace logout, shutdown and suspend API

David Edmundson noreply at phabricator.kde.org
Wed Feb 27 15:15:12 GMT 2019


davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
davidedmundson requested review of this revision.

REVISION 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.
  
  This is intended to be an API break, which is fine as kworkspace is only
  to be used by plasma. The relevant DataSource will remain compatiable.
  
  WIP: As I need to port all the calling code, and I want to port
  SessionsModel (probably in a different patch)

TEST PLAN
  Ran sessionstest on my logind machine
  I do need other people to test their setups. 
  Especially a BSD person with CK1

REPOSITORY
  R120 Plasma Workspace

BRANCH
  davidedmundson/kworkspace2

REVISION DETAIL
  https://phabricator.kde.org/D19389

AFFECTED FILES
  libkworkspace/CMakeLists.txt
  libkworkspace/kworkspace.cpp
  libkworkspace/kworkspace_p.h
  libkworkspace/login1_manager_interface.cpp
  libkworkspace/loginddbustypes.h
  libkworkspace/org.freedesktop.ConsoleKit.Manager.xml
  libkworkspace/org.freedesktop.UPower.xml
  libkworkspace/org.freedesktop.login1.Manager.xml
  libkworkspace/org.freedesktop.login1.Seat.xml
  libkworkspace/org.freedesktop.login1.Session.xml
  libkworkspace/org.freedesktop.login1.User.xml
  libkworkspace/sessionmanagement.cpp
  libkworkspace/sessionmanagement.h
  libkworkspace/sessionmanagementbackend.cpp
  libkworkspace/sessionmanagementbackend.h
  libkworkspace/tests/CMakeLists.txt
  libkworkspace/tests/sessiontest.cpp

To: davidedmundson, #plasma
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190227/73dc52c6/attachment.html>


More information about the Plasma-devel mailing list