if we know the conector name of a qscreen, use it to recover the internal
integer screen id.
used by external scripts to do things to the "current" containment
for instance systemsettings invoking the wallpaper configuration
dialog for the same containment for the screen systemsettings currently resides in
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
createWaitingPanels is not guaranteed to create all of them.
Those which have a desktop not ready yet will go back to waitingpanels until new turn.
This scenario sometimes happens during first run scripts or update ones, causing a crash in those cases
Panel struts may need to be updated when screen configuration changes,
even when the panel isn't resized or moved. Example: screen below the
panel is removed.
Currently the struts are only sometimes updated, that is when
ShellCorona::reconsiderOutputs is called. This is timing dependant since
ShellCorona::addOutput connects QScreen::geometryChange to it, and
geometryChagned signal can arrive before addOutput is called, in which
case the struts aren't updated.
I am not sure if this behaviour is intended, but it's best to not rely
on it. Instead lets just update the struts when screen size changes like
we used to.
There was a previous commit d66d6d57 that is similar, however it got
lost when the dependency on KScreen was removed.
Since now we rely on QScreen, we need to connect the QScreen signal
every time it changes, hence the change being in setScreenToFollow.
There is an error handling path when we fetch the relevant config()
```
KConfigGroup PanelView::panelConfig(...
{
if (!containment || !screen) {
return KConfigGroup();
}
```
which we indiscrimiately call parent() on.
This patch guards that case, which is presumably screen being
temporarily null.
This code is also Plasma 5.8 compatibility fallback, so arguably we
could get rid of it.
BUG: 425711
The two ways of disabling session management have the same impact on the
session being saved, but there is one behavioural side-effect that
turned out to be less ideal.
By disabling completely we don't follow the session manager telling the
application to quit. That's not something needed with the systemd boot,
but for the legacy boot effectively we were just closing applications by
ripping the X connection away from under them.
Some applications are bad at handling this and this led to a bunch of
crashes or dangling processes at logout.
This reverts commit 9be7dedb87.
CCBUG: 424408
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.
DesktopView's constructor calls PlasmaQuick::ContainmentView(corona,
nullptr), to initialise the parent class. nullptr being the parent.
In this case it makes sense as QWindow's overload of setParent must be a
QWindow, but memory management has to happen somewhere.
The current code is broken as the course of events is:
- we delete the containment
- an existing connect to containment deleted goes to
panelContainmentDestroyed
- this updates m_panelViews and calls deleteLater
- this deleteLater isn't run before other exit handlers
A popup needs to grab the keyboard and the pointer in order to dismiss
itself when another window is clicked. It works perfectly on X11.
On Wayland though, the compositor is responsible for dismissing popups
if some surface of another application has been clicked. Note that I
said "of another application." If user clicks some surface of the same
application, the compositor won't dismiss the popup.
If the application uses only QtWidgets, then the popup will be closed
as expected in both cases. But if the application uses both Qt Quick and
Qt Widgets, e.g. plasmashell, then the popup won't be dismissed if a
QQuickItem has been clicked.
It is a Qt bug, but for the time being, this change introduces an event
filter that monitors Qt::MouseButtonPress events and when needed closes
the active popup widget. This is a workaround.
CCBUG: 379635
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.
Summary:
This brings numerous advantages such as:
- easier admin configuration with drop-ins, overrides and multiple
hooks throughout (and only having to learn one tool)
- session cleanup on exit, avoiding that occasional part where shutdown
hangs
- startup that actually knows when things are up
- race free autostart and DBus activation at once
- logs that rotate are split by service and usable
- resource management through slices and cgroups (the part I want)
Over the past 2 years I've been trying to tidy up and encapsulate the
relevant parts of startup into the binary plasma-session so that we can
just runtime swap out that one part and supporting both paths will be
easy.
Support is toggleable via cmake flag, as it seems like it should be a
distro decision, especially as we will require a specific systemd with
the xdg-generator.
KDED/kwin/other services are attached to the relevant repo.
Task T11914
Differential Revision: https://phabricator.kde.org/D28305
squash
ShellCorona is a messy class doing mulitple functions.
This patch splits out all telemetry code into a new class, meaning it's
easier to extend. Code remains the same.
Aggregate text for KRunner in DesktopView to prevent eating fast-typed characters.
CCBUG: 416145
partial solution: resolved for DesktopView, not resolved for running KRunner from shortcut
Test Plan:
When DesktopView is focused, typed characters show KRunner query.
All fast-typed characters should now appear correctly in KRunner window,
instead of only first typed character.
The HIG specifies that actions and menu items should start with action
verbs, and that ellipses should only be used for actions that open a
separate window to complete the action. This commit applies that to the
"Activities..." menu item.