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 also makes use of ksmserver a lot more optional. Requests to logout
go directly to org.plasma.Shutdown.
Effort has been put into keeping the QML context property usage API
compatiable even though the current code is really a mess.
And use KPluginMetaData instead. It's what we get from the PackageLoader anyway.
Unlike KPluginInfo KPluginMetaData supports multiple authors. To keep the current behaviour of the model the code picks the first one and ignores the potential others.
Instead of using KPluginTrader's contraint system pass a filter function to KPackage::PackageLoader.
Also move the later filtering into said filter function.
It can apparently happen that virtual desktops is empty at a given point
in time. Potentially due to other bugs on the system.
Calls to desktopIds.at(N) will fail.
BUG: 427106
This method calls doesn't seem to work anymore having been replaced by
the more intuitve virtual paths on the logind over a year ago.
Arguably that's still a bug upstream that GetSessionByPID no longer
works correctly, but we may as well port to the simpler path that avoids
so many layers of indirection.
Use of "/auto" does not exist on old distros so the legacy path is kept.
The paths used in this class were always wrong, which went unnoticed as
this is the first usage of them.
BUG: 423526
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.
This brings the PlasmoidHeading used in the notification item into
visual consistency with other PlasmoidHeadings, once we merge
https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/98.
When using a color scheme that lacks Header colors, there is no visual
change whatsoever.
Today on master, the system tray menu *always* shows a back button, regardless of the context.
But when all items are visible, the back button simply acts as a "close" button, since we are
only "one layer" deep and there is nowhere to go back to. This commit fixes that issue by only
displaying the back button hen the hidden items view has any items in it such that you could go
back to it.
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.
- Increase the size of next/previous media toolbuttons. I didn't think there was enough padding around the buttons here.
- Set a default width and height of LockScreen.qml. This makes it start with a sane default size when run with qmlscene.
As BalooSearchRunner regrettably is a QGuiApplication is connects to our
X SessionManager.
By default Qt apps behave like "applications" and this can end up on our
auto-restart list if the user saves their session.
Given this is DBus activated this doesn't make sense.
same as 5a648c56eb for the service runner.
Kservice internally will hold a KDirWatch instance through KSycoca and
that instance has an inotify instance. Since inotify instances have a
per-user limit we mustn't be wasteful with them. Since our runner
threads do not actually need automatic ksyscoca reloading (reloading
on-demand as we use ksyscoca is perfectly reasonable) we need to
explicitly disable this feature so the internal inotify instance can be
freed.
CCBUG: 423818
xdg-desktop.target was the name at the time of first being written, but
it was renamed upstream.. I had both on my system from a previous
compilation.
plasma-workspace.target already "Wants" the correctly named one.
Noticed by Benjamin Berg
Most of our other applets do this so their configuration window can be
reached without having to right-click anything, which is especially
important for touch. The Clipboard applet should too.