ListView will absorb the key events, so `Keys.onPressed` in
ClipboardPage will not receive the event. Instead we should connect
those key events to `arrowKeyPressed()`.
BUG: 448811
BUG: 450040
FIXED-IN: 5.24.2
(cherry picked from commit 95a267d582)
Get rid of the delayed optimal size calculation caused by Qt.callLater
and calculate optimal size immediately when an applet's size changes.
This removes the unnecessary jumping of applets that are centered between 2
spacers.
BUG: 431668
FIXED-IN: 5.24.2
(cherry picked from commit 5824e63620)
Since the DesktopView has "transparent" clear color, it will allocate a
buffer with an alpha channel and QtWayland won't be able to set an
opaque region. This change sets the clear color of DesktopView to "black"
so overdraw can be fixed in kwin and to improve render performance on
wayland.
Cherry picked from commit 745e2c0828,
except that it also adds a platform check. Some people reported that
setColor(Qt::black) in DesktopView breaks panel translucency on X11.
A few of plasma developers have tried to reproduce that issue, but
couldn't. It needs more investigation. In meanwhile, let's set clear
color to black only on Wayland.
Right now we change the intensity of shadows based on the color scheme's
text color, but with a property called "lightBackground". This indicates
that we wanted to do it based on the background color itself, but did
not or could not, so settled on using the text color as a proxy. However
this is wrong; there is no relationship between the active color
scheme's text color and the color of the background image.
Even if we could or did fix that, it would probably still be wrong,
because using lighter shadows on a genuinely light background would
result in worse contrast and readability, especially if the light
background was very visually busy.
For these reasons, in most other places, we have since settled on the
mantra of "shadows should be black", and this commit makes the lock and
login screens follow that convention as well.
BUG: 449985
FIXED-IN: 5.24.2
(cherry picked from commit 146ef22fcb)
This way the icons are always vertically aligned even when some of
their labels are multi-line strings.
BUG: 450238
FIXED-IN: 5.24.2
(cherry picked from commit dde0f20b23)
Creating and deleting users needs that too
This also means that we need to be more correct with the types passed into the DBus calls since with passing the args as list we don't get implicit conversion to the correct type any more
BUG: 450122
FIXED-IN: 5.24.2
(cherry picked from commit 79113d99e4)
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
(cherry picked from commit 49013bf4a5)
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
(cherry picked from commit 03f982261b)
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
(cherry picked from commit df6821dd67)
When mimeType == " " - KApplicationTrader tries to find out which
application should be used.
This is not what we want
(cherry picked from commit f73c6b4910)
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
(cherry picked from commit 15021b432a)
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
(cherry picked from commit 3e54282420)
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
(cherry picked from commit 7024a32824)
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
(cherry picked from commit eb2fe69302)
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
(cherry picked from commit a321bbcefe)
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.
(cherry picked from commit 6ebbab4778)
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.
(cherry picked from commit d58b9eabf3)
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
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
(cherry picked from commit 7736fc8dfa)
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
(cherry picked from commit 39ecc45e5b)
Without deducting margins, the ScrollView can be scrolled horizontally.
The extra space can be seen after removing the scrollbar hack.
(cherry picked from commit fdebefb103)