Shutdown scripts are done by startkde after ksmserver quits. Which never
happens because we've told systemd to shutdown.
Old systems worked because they used to communicate with the display
manager which then closed us before shutting down, this is no longer the
case.
This moves handling the shutdown scripts into ksmserver (which already
handles startup scripts) and runs them before asking logind to shutdown.
BUG: 356190
REVIEW: 126268
This adds a user switcher borrowing elements from the lock screen and log out dialog.
It will be used instead of KRunner as main UI for switching sessions. The sessions runner
will stay there for the time being.
CHANGLOG: The main user switcher UI has been completely re-designed
REVIEW: 124585
On Wayland ksmserver should not be responsible for the lockscreen,
but the compositor takes care of providing the lock screen. To prevent
conflicts KSMServer gets a new command line option to enable it.
The code is slightly changed to not pass a series of boolean flags to
KSMServer, but a flags type.
The startplasma script for Wayland is adjusted to start ksmserver with
the new command line option.
REVIEW: 126022
With the change to the QuickViewSharedEngine, it seems to load synchronously, meaning the
status changed slot is never called and when I broke my lockscreen I locked myself out
in the process.
REVIEW: 125848
This switch is rarely used and screenlocker is important part of the
Plasma system. So it makes no sense to have it build-disabled by ifdef
Reviewed by: Martin Gräßlin
This work around was ifdef'd with COMPILE_SCREEN_LOCKER but since
config-ksmserver.h was never included this code never got compiled.
Reviewed-By: Martin Gräßlin
This makes specifying absolute paths on the commandline that are then
encoded into the config file work.
Not hard-coding the packackage prefix is also helpful on a multiarch
layout where the prefix is /usr/${host} but arch-independent files
should still be installed to /usr/share (i.e a level below the
prefix).
REVIEW: 125844
From the KDisplayManager code :
// This only tells KDM to not auto-re-login upon session crash
void
KDisplayManager::setLock(bool on)
{
if (DMType == NewKDM || DMType == OldKDM)
exec(on ? "lock\n" : "unlock\n");
}
Given we no longer have kdm in Plasma 5. This hardly makes sense.
REVIEW: 125837
Currently X11Locker highly depends upon the X specific parts and doesn't
work on the wayland. This WaylandLocker class is default implementation
for the AbstractLocker and currently no-op.
This commit also adds the guards for X specific code in KSldApp so it
don't crash on the wayland platform
REVIEW: 125827
We seem to have a problem in the autotest concerning grabbing so
try to make the whole thing less timing dependent.
The XSync should be before the server grab, otherwise it just doesn't
make sense. And all XLib code should do a flush as otherwise we don't
know if that will happen at all.
This unittest verifies that the emergency window is shown by verifying
- There is at least one white and one black pixel
- There is no other colored pixel then black and white
Reviewed-By: Martin Gräßlin
This commit introduces AbstractLocker class, which can be subclassed to
provide platform specific implementation of LockScreen, for example
X11Locker and WaylandLocker.
REVIEW: 125802
Earlier we were showing dummy window to make sure that if background of
X is black and we fail to show our lockwindow, tests wouldn't assume
that lockwindow is shown.
However this solution had flow that window we were showing was not
colored at all. So either it was black or transperant and tests would
pass even if something is broken. This commit fixes it with :
- Show dummy window with red color
- Verify that red colored window is shown
- Show our lock window
- Verify that screen is black
REVIEW: 125805
We handle screen add/remove, but not the active screen we're on changing
size/position.
KScreen can potentially resize an existing screen after it detects one
has been removed, also virtualbox can resize guest displays when the
host resizes the window.
REVIEW: 125605
By grabbing the XServer we can ensure that no other client is
sending X events. This eliminates a possible timing attack in
the time frame between grabbing keyboard and pointer.
At the same time the waiting and try again becomes useless as the
XServer is grabbed and no other client could release the hold
input device grab.
REVIEW: 122528
For the screenlocker architecture to work it's crucial that the views
are shown as fast as possible with valid content. The OpenGL context
initializes with a copy of the current framebuffer (which is the unlocked
screen) and this is rendered as the first content of the lock screen
and stays visible till QtQuick has rendered a proper scene.
Initial rendering of our scene takes some time (> 500 msec) in which
the unlocked screen stays visible, but the architecture thinks it's
already fully locked and e.g. starts suspending the system. This
can result in the system waking up with the screen looking as unlocked.
This change ensures that at least one frame is rendered properly before
starting to load the real scene in an async way. That's most likely just
the black background which means the screen is properly locked, even if
it is not the proper greeter yet. It's fine for the system to suspend in
this stage as the screen is properly black.
REVIEW: 124948
The background of the whole screen locker architecture is black. During
starting the lockscreen there might be a frame with just the background.
To prevent flickering let's better use black instead of the default
white.