KSMServer sets which session to use on startup
`KSmServer::restoreSession(QString)`
When the session is up and ready either systemd or plasma-session invoke
`restoreSession()` that actively starts restoring clients.
At some point we need to notify kwin which session we're using so that
it can handle restorng window properties such as the virtual desktop.
This was done in the first call, but this has no guarantee that kwin has
started yet. Without kwin getting the DBus call it has no information to
match up restoration information.
The state RestoringWMSession is dropped as it does nothing useful.
BUG: 442380
ksmserver has two services. One for the service itself, and a single
shot invoked later when we want to restore the session.
They currently both have the same description which isn't very helpful.
This text is not user facing in our UIs anywhere, only for devs.
Currently we have a whole daisy-chain of startplasmawayland-> kwin ->
startplasmawaylandsession -> launching the session.
This was needed as we needed environment variables which previously we
only knew after kwin started.
After some kwin refactoring this is no longer the case, and
kwin_wayland_wrapper will sync it's environment variables to the
appropriate startup environments.
This allows us to move starting kwin_wayland to be systemd managed,
brining resource control, alongside it's classic counterpart
plasma-session.
Use image sizeInBytes
Use Qt:endl
register qml with qml register anonymous type
Remplace QDrag start by QDarg exec
QModel acces, remove use of child
Use QFileinfo, use birthTime()
Use QRandomGenerator
- Remove check for kded and confupdate stages in SplashApp, those setStage()
calls were removed a long time ago[1]
- Rename 'kinit' stage to 'startPlasma', since it's called from startplasma
- Remove startKDEInit(), it was declared but not defined anywhere, most
likely left-over from a previous refactor.
https://phabricator.kde.org/R297:185afa8a3af8002172d8f5d6aa08c57244422a12
These actions bypass the user setting for whether or not to show the
logout screen and always log out/reboot/etc. immediately. Because they
have default keyboard shortcuts, they can be triggered by accident and
cause unexpected logouts/reboots/etc.
BUG: 435954
FIXED-IN: 5.22
- Port away from cmake macro macro_bool_to_01, which was being used from
the copy of that macro that KDELibs4Support has
- Clean up redundant CMake variables
Wants says we should bring ksmserver up, but by default that could be in
any order, we need to define it. kcminit also potentially exports
environment variables.
This was written with the correct order in-mind but the wrong keyword
used. We don't need "Wants" as plasma-core.target already defines that
we will be loading them along with plasmashell.
It is important that ksmserver is up and has completed exporting the
SESSION_MANAGER env, otherwise plasmashell will not propogate it so
applications it launches introducing an X session regression
Previously the call to ksplash was being emitted by plasma-session. This
isn't used in the systemd startup so it was introduced in a somewhat
messy script.
This script has an issue:
If ksplash is disabled the bus name won't be registered. Typically this
isn't an issue. However to avoid a race condition ksplash registers
itself as being DBus activatable, so that the dbus server holds
dispatching the message.
This combo means ksmserver our unit is considered as not running until
our script times out. This then defers other things in the chain that
depend on ksmserver.
Moving the call into the relevant piece of code into ksmserver unifies
things into a single path and gives us more control.
BUG: 432364
Currently if hypothetically closeSession was called multiple times
before the async operation completed the first caller would never get a
reply and then be left hanging potentially forever.
This is unlikely to happen in real life given only the plasma shutdown
binary should be calling this and that's a unique application.
Solves a case where an application installs multiple desktop files
for handling different mime types. Typically those have NoDisplay=true
as recommended by the spec. But we want to associate the application
with the "main" desktop file.
An example of this happening within KDE is KDevelop.
On X Kwin's lifespan used to be managed by XSMP. This accidentally broke
in 5.20 as we made kwin start before ksmserver for speed purposes and
wayland preparation.
This leaves kwin to be killed by the display manager as the X connection
closes, but this can lead to deadlocks.
BUG:428817
On wayland kwin's lifespan is mapped to the lifespan of the ksmserver
binary. This is problematic as it makes our entire xwayland robustness
redundant if we ultimately rely on an application that /has/ to run in
xwayland.
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
Plasma core is moved away from being a template. This makes it easier
for others to mark themselves as being after. A new readme is added to
explain the design.
This means on logout we'll be gracefully closed down.
All of these are closing down properly anyway, but this makes things a
bit more explicit in case you managed to log out at an awkward point.
setGlobalShortcut sets the default shortcut and binds the current shortcut
to the action. It will not overwrite the current shortcut if the user configure
a different one.