File: DESIGN

package info (click to toggle)
kscreenlocker 5.14.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,440 kB
  • sloc: cpp: 6,357; ansic: 897; xml: 87; sh: 43; perl: 29; makefile: 9
file content (25 lines) | stat: -rw-r--r-- 1,731 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

The screenlocker is statically built into ksmserver, it gets instantiated by the main class KSldApp.
It provides 3 main things:
* Shows a fullscreen window (LockWindow class), that spawns into all screens, eats the input events and is black to hide everything.
* Provides the usual org.freedesktop.ScreenSaver interface
* starts the process that will actually show the unlock screen

Security considerations.
* greeter windows are marked with the _KDE_SCREEN_LOCKER atom, no windows of other processes can go over them

* the screen locker is managed by ksmserver: in case of crash of a greeter or an X screen saver, the global lock window that spawns between all monitors will still be there. In case of crash of ksmserver, being the session manager, the whole session will be brought down.

KSldApp may launch one of two possible unlock screen binaries, decided by the PlasmaEnable bool key in kscreensaverrc:

1) Simple
The one in the greeter subdirectory, built in the kscreenlocker_greet binary.
It uses a series of QML files organized in a Plasma Package to display the actual unlocker ui, one for each screen in case of multimonitor.
This greeter can optionally support legacy X screensavers, for doing so creates another fullscreen window per screen on top of the greeter one, and xembends a screensaver window.
The X screensaver goes away after mouse move and gets back after a minute (or user pressing esc) 

2) Plasma based
The source lives in kde-workspace/plasma/screensaver/shell/ and the binary is plasma-overlay.
It instances a Plasma scene, a View and a Containment for each screen in case of multimonitor.
Uses the same QML package to display the unlocker as kscreenlocker_greet.
Does not support X screensavers.