When we are using a charge threshold, the kernel may stop charging
within a percentage point of the actual threshold and this is
considered correct behavior, so we have to handle that. See
https://bugzilla.kernel.org/show_bug.cgi?id=215531.
Also, Upower may give us a status of "Not charging" rather than
"Fully charged", so we need to account for that as well. See
https://gitlab.freedesktop.org/upower/upower/-/issues/142.
BUG: 435931
StatusNotifierItem.qml does not explicitly handle the case of
right-clicking, which causes right-clicks to be ignored unless you also
happen to have the libappindicator package installed, which injects a
handler for this itself. But this should work even if you don't have
that package installed; this commit fixes it.
BUG: 449870
FIXED-IN: 5.24.1
Sad that we still need to do this because the patch to fix that bug
never got merged because it failed to adjust a failing test, and has
bitrotted in the two years since then.
BUG: 448387
FIXED-IN: 5.24.1
OpenUrlJob
We are starting a KService, but with extra steps. Use the appropriate
job.
This fixes launching apps since OpenUrlJob, by default, doesn't launch
executables
BUG: 449900
There is also the possibility that the screen mapping by screenpool gets
lost or partially lost ( like removal of plasmashellrc but not
appletsrc)
In this case if it was a multimonitor setup there will be containments
assigned to a screen number which doesn't have a known connector.
List them as well, marked as "Unknown 1" "Unknown 2" etc.
This is an edge case of the edge case but it well possible it happens so
it should be managed as well

libklipper_common_SRCS are compiled into the libklipper_common_static
library and then linked for the Klipper application. The same sources
are also compiled again to build plasma_engine_clipboard via
plasma_engine_clipboard_SRCS. This results in almost double the
compile time and repeated diagnostic messages (if there are any).
Use the previously built static library for linking the data engine.
When adding KCMs to the desktop, we add the entry with NoDisplay=true so that it does
not show up in a search. However before this commit, that would cause the entry to
not show up on the desktop as well.
Because of the filtering in the services runner, we already make sure that only relevant
entries can get added to the desktop in the first place.
BUG: 449243
FIXED-IN: 5.24.1
If we have multiple sources for the application, we end up with multiple entries.
This is not useful in any scenario, because the generated appstream URL
is exactly the same.
Consequently we should return from the function when we created the first action.
BUG: 448564
All the sizing and positioning code in this SvgItem relies on assumption
that plasmoid's location would we strictly either one of four edge
types. So this patch ensures that this thin separator line is only
visible when this assumption is true. Otherwise its both width and
height get reset (by binding `undefined`), and SVG starts filling up
the whole available area, which leads to a visual glitch that looks
like a as grayed out or faded applet.
See also: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/576
BUG: 449535
Double quoted multi-line strings are custom Qt extension, and thus
should be avoided, as they are problematic for syntax support in
various text editors.
GIT_SILENT
The MouseArea in AbstractItem needs to be above applets
when it's in the grid hidden area so that it can receive
hover events while the mouse is over an applet
But when the applet is shown as an icon on the regular
systray it needs to be below so the PlasmoidItem `onClick`
takes precedence and systray collapsing works.
BUG: 449533
FIXED-IN: 5.24
Allow the Panel to get active keyboard focus via a kwyboard shortcut which will cycle between all panels.
When a panel has focus, the active focus can be navigated around either with tab/backtab or arrow keys.
Simple popup applets which only display an icon will work automatically,
Complex applets like the System tray or the taskbar will have focus that can navigate on all their sub-elements, to activate a particular systray applet or activate a particular window
Co-authored with Benjamin Port<benjamin.port@enioka.com>
CCBUG: 352476
The Layer Shell Qt library is updated to match its API more closely to
the protocol. It is now possible, or rather required if the behavior
should not change, to specify a desired output for a LayerShell window.
There's no use of static declarations in headers, those result in compiler
warnings. They could be removed envirely after moving one function up a bit.
Give context though i18nc for the use of "uninstallable" so that it won't be misinterpreted as "not installable" by translators, as has happened in some cases (e.g. sv & zh_TW).
Applets in PlasmoidItem were blocking events from reaching the
ToolTipArea, so I moved the on hover logic to the AbstractItem's
MouseArea and put the MouseArea over the iconContainer. The
iconContainer is the parent of applets. Presses tend to hit the center,
which is where the applet is, preventing ToolTipArea::containsMouse from
being true and preventing the highlight from moving to the pressed item.
Hopefully this doesn't cause duplicate actions when events reach the
applet. I tested the patch on the nightcolor applet and all the other
default applets and didn't see anything wrong. I think this may be
because the signals are sending QML MouseEvents to the applets, causing
them to be accepted if the applet can accept them. Then when the signal
handlers are done, since the events are already accepted, they should
not move beyond the MouseArea and cause another round of event handling.
Combine the "Text selection only", "Ignore selection" and "Ignore images"
options into separate sets of radio buttons for text and images, to make
their functions explicit.
Remove the "Prevent empty clipboard" option (but leave it as a hidden
config file setting), it was difficult to explain and it is unclear if it
ever had a use case.
Convert the page to a QFormLayout, and add explanatory text to existing
controls where appropriate.
GUI:
I18N:
This empty mousearea serves for the sole purpose of refusing touch events
which otherwise are eaten by Control stealing the event from any of its parents
this fixes applet dragging in editmode for all systemmonitor plasmoids
Over the years we've changed icon spacing many times. And every time we
do, we get bug reports about it from people who were happier with the
previous value. Typically we close these bug reports as RESOLVED
INTENTIONAL, but it always leaves a sour taste in the mouth. People's
preferences for spacings and paddings are legitimate.
In addition, a larger spacing can be quite useful in Tablet Mode, to
increase the size of the touch targets to be closer to the size of the
user's finger.
This commit adds a simple UI to switch the spacings of the visible items
between three values, with the middle one that matches the current
spacing being the default. While Tablet Mode is activated, the spacing is
automatically set to its highest value and made non-user-adjustable,
just like we already do this for the icon size setting.
Applets were apparently blindly converted to use JSON metadata without
checking the usage. At least KPackage now has a direct getter for the
package metadata, so use that to get the plugin ID instead of manually
loading the package metadata.
BUG: 448529
It is important that we end plasma-core.target plasma-workspace.target
and graphical-session.target when we log out. graphical-session in turn
closes all other apps and daemons and prevents restarts.
Handling it in systemd gives the least racey option.
graphical-session used to be hanlded in the plasma-ksmserver service
file, but this was removed in 5.24 in a refactor where it caused issues
for Xwayland restarting.
This patch reintroduces the sentinel programs to close down our target,
which in turn take down the other targets. It also removes a complicated
use of templates that in hindsight didn't really solve anything.
BUG: 448492
Testing done:
- logout of wayland shows all targets as inactive, logging in
repeatedly works smoothly
- logout of X11 behaves the same.
- calling systemctl --user stop plasma-kwin_wayland.service closes the
session
- killing ksmserver on wayland does not close the session
- killing ksmserver on X does