This commit introduces AbstractLocker class, which can be subclassed to
provide platform specific implementation of LockScreen, for example
X11Locker and WaylandLocker.
REVIEW: 125802
If the greeter crashes on startup ksld is caught in a restart loop which
causes 100 % CPU usage and makes it impossible to unlock the session.
With this change the greeter is only allowed to crash four times and
ksld goes into an emergency mode. This mode ensures that our black
background window gets shown with a message indicating how to unlock
using loginctl. This is rather technical but better than leaving the
system in a state which makes it impossible to unlock.
Directly unlocking in the error case is not an option as that could
be used to attack the screen locker infrastructure.
BUG: 351696
REVIEW: 124915
The screen is only truly locked once our black background window is
shown. So far we locked once the greeter process was started. At this
point the screen was still unlocked and a suspend would result in system
waking up with an unlocked screen for a brief period.
This change emits the locked signal once we got a MapNotify event for
our black background window which means the screen is properly turned
black and we can allow e.g. going to suspend.
CCBUG: 348850
REVIEW: 124912
LockWindow is mostly just the logic to ensure that the greeter is kept
on top of the stack. In addition it did render a black qwidget. Testing
showed that the paintEvent never got invoked, though, so the rendering
did not really work.
The rendering feature is now split out into a dedicated QRasterWindow
as we don't need a full QWidget for it. It also needed to be split into
a dedicated class as it's not possible to inherit from QSurface and mix
with XLib code (QSurface defines a Window type which bites with XLib).
This change implements support for white listed global shortcuts in
the lock screen. It interacts with KGlobalAccel to fetch shortcuts
and checks them when a key is pressed. For more detailed information
on how this functions, please see the documentation added to the new
file globalacel.h.
So far only shortcuts from kmix are white listed. This allows to
mute and change volume while the screen is locked.
CCBUG: 148228
CCBUG: 104353
FEATURE: 198097
FIXED-IN: 5.3.0
REVIEW: 122419
The screenlocker_greet needs to tell the parent ksld process which
windows it created. Ksld sends input events to these windows. So
far this was based on an X property on the window. Unfortunately
ksld didn't validate whether the windows tagged with this property
belong to the screenlocker_greet process it started.
With this change the communication for announcing windows is moved
away from the X11 protocol and instead a custom Wayland protocol is
used.
Ksld starts a KWaylandServer when the greet process gets started. It
creates anonymous unix sockets for the connection and passes one
filedescriptor to the started greeter process.
The check for the X property is removed in ksld and instead only
windows ids passed through the Wayland socket connection are
accepted.
REVIEW: 121429
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0