Summary:
Currently there are two different sources of SystemTray items:
* Plasmoids
* Status Notifier
Thi change adds new model that holds both Plasmoids and SNIs.
Test Plan: Add/disable applets. Start/stop SNI app.
Reviewers: #plasma, broulik, ngraham, nicolasfella
Reviewed By: nicolasfella
Subscribers: plasma-devel, nicolasfella, anthonyfieroni
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25580
Summary: KPluginInfo would force the load of the desktop file for information we don't need.
Test Plan: Plasma still works
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22480
Test Plan: system tray build with -DQT_NO_FOREACH, still does system tray things
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22066
Bus names that start with a colon (':') character are unique connection names rather than well-known bus names
you want to be listening for.
Since the same code path is used for initial setup as is for detecting services at runtime, we would needlessly
iterate the list of known dbus-activatable services as well as apply a regular expression on them for all unique
connection names wasting some cycles.
Differential Revision: https://phabricator.kde.org/D21451
Summary:
SystemTray::serviceRegistered is called tons of times; the regexp
construction inside the for-loop is expensive and should be avoided.
Thus construct the regexp once, and re-use the regexp object each time.
Test Plan:
Before:
{F6432674}
After:
{F6432675}
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17025
Summary:
Those had no transient parent set, so they got displayed somewhere, most of the
time on the wrong screen.
Test Plan:
Works fine for spotify and kteatime now, but certain applications
which trigger a LayoutChanged signal on the opened event have a Y offset.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11584
Summary: BUG: 381174
Test Plan:
Had debug in QtWayland
Clicked on systray
Had parent, menu was in the right position
Reviewers: #plasma, mart, graesslin
Reviewed By: #plasma, mart, graesslin
Subscribers: apol, graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8338
Summary:
We can get into a state where we have applets with broken metadata.
(which is a different bug)
Someone clearly wrote this code to try and guard against accessing an
invalid metadata when checking names, but instead made it so that when
we try to remove a specific task in the system tray we accidentally also
remove up any of these applets as well, which doesn't make much sense.
CCBUG: 377050
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5422
This way plasmoid and SNI context menus get accelerators assigned to by default.
CCBUG: 361915
Differential Revision: https://phabricator.kde.org/D5058
This belongs in a header only (where it already is) and my IDE complains about it.
Since the macro expands to nothing anyway this doesn't change anything.
Differential Revision: https://phabricator.kde.org/D4456
This is the same Plasma ContainmentInterface does. Otherwise QtQuick gets confused about mouse state.
Differential Revision: https://phabricator.kde.org/D4455
This belongs in a header only (where it already is) and my IDE complains about it.
Since the macro expands to nothing anyway this doesn't change anything.
Differential Revision: https://phabricator.kde.org/D4456
This is the same Plasma ContainmentInterface does. Otherwise QtQuick gets confused about mouse state.
Differential Revision: https://phabricator.kde.org/D4455
Summary:
Changes triggered by investigation into a long-running high CPU usage bug with system tray animations. The systray itself had icon name to icon resolution code, which was being triggered (twice) for every icon, every time any icon in the systray was updated. This code was spinning up a KIconLoader on each of these instances, and throwing it directly away. Each one triggered a large quantity of memory allocations and disk scans.
This patch moves the extra bit of "appName" logic from the native part of the system tray to the statusnotifieritem datasource, which already had a stored 'customIconLoader' to handle icon theme paths, and removes the special lookup from the sytemtray applet completely. It also prefers icons provided by the dataengine to doing another lookup (contentious?). This removes all the extra CPU usage outside of the QML scene graph and graphics drivers locally.
This is very much a looking for feedback item - there are things about the icon loading paths I almost certainly haven't appreciated yet, and perhaps preferring loading by icon name in the applet has a another purpose.
BUG: 356479
Test Plan: Have tested locally with kgpg and steam, the two apps I have that trigger the old code path. In neither case, however, did the appName logic produce a different result to the code with just the icon search path in statusnotifieritem.
Reviewers: #plasma, davidedmundson, mart
Reviewed By: #plasma, davidedmundson, mart
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2986
Summary:
Some users complain that applets do not behave like applets in the
system tray, this is because they're not adding them in the system tray.
This makes it a bit more intuitive to add applets to the system tray by
allowing drag and drop of applets with NotificationArea=true into the
system tray.
CCBUG: 358283
Test Plan:
Dragged digital clock over system tray
system tray moved and the clock was added to the side
Dragged kate sessions over system tray
on drop, kate sessions applet was added to the tray
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3212
Summary:
Changes triggered by investigation into a long-running high CPU usage bug with system tray animations. The systray itself had icon name to icon resolution code, which was being triggered (twice) for every icon, every time any icon in the systray was updated. This code was spinning up a KIconLoader on each of these instances, and throwing it directly away. Each one triggered a large quantity of memory allocations and disk scans.
This patch moves the extra bit of "appName" logic from the native part of the system tray to the statusnotifieritem datasource, which already had a stored 'customIconLoader' to handle icon theme paths, and removes the special lookup from the sytemtray applet completely. It also prefers icons provided by the dataengine to doing another lookup (contentious?). This removes all the extra CPU usage outside of the QML scene graph and graphics drivers locally.
This is very much a looking for feedback item - there are things about the icon loading paths I almost certainly haven't appreciated yet, and perhaps preferring loading by icon name in the applet has a another purpose.
BUG: 356479
Test Plan: Have tested locally with kgpg and steam, the two apps I have that trigger the old code path. In neither case, however, did the appName logic produce a different result to the code with just the icon search path in statusnotifieritem.
Reviewers: #plasma, davidedmundson, mart
Reviewed By: #plasma, davidedmundson, mart
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2986
When there is already a config for a given plasmoid, reuse it
instead of creating a brand new plasmoid (having config groups
endlessy accumulating in the config file)
https://phabricator.kde.org/D2817
BUG:365618
BUG:365569
be able to destroy applets even when locked: delete their config
by hand.
Except in one case: when the applet gets automatically destroyed
by dbus activation do *not* clear the config, it should be
reused next time.
BUG:365618
BUG:365569
Summary:
Plasma::PluginLoader::self()->listAppletInfo(QString() is expensive, it
loads and parses every .desktop file individually. Twice.
The main offender is the defaultApplets property, which gets requested
multiple times from JS space, and we reparse the files every time.
Moving the work to the constructor solves that. This saves loading (on
my machine) ~900 desktop files.
Test Plan:
- wiped config, defaults appeared
- DBus activated still worked
- restore works as before
Running "time plasmashell" shows:
BEFORE:
plasmashell 4.01s user 0.46s system 87% cpu 5.116 total
plasmashell 4.01s user 0.54s system 74% cpu 6.124 total
AFTER:
plasmashell 3.17s user 0.42s system 68% cpu 5.259 total
plasmashell 3.18s user 0.46s system 81% cpu 4.475 total
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2756
Summary:
Applet::destroy doesn't delete the applet from Containment::applets in
the same event. Potentially a dbus activated service being restarted can
be added in this time, causing us to try adding a new applet with the
same ID before the first object is deleted.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2703
Summary:
Applet::destroy doesn't delete the applet from Containment::applets in
the same event. Potentially a dbus activated service being restarted can
be added in this time, causing us to try adding a new applet with the
same ID before the first object is deleted.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2703
Summary:
Also set a consistent naming structure and to be only Info+ by default.
This may mean you need to update your logging rules if you want debug
output.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1956
An enum value is used that does not exist in the current release.
We only need to show that it is neither a Panel nor Desktop, so
hardcoding the upcoming value will work.
Reviewed by Marco Martin.
don't hardcode -a as the internal systray screen anymore.
give it the new customembeddedcontainment containment type,
and ignore those in panel creation.
the old systray logic in containmentforscreen gets reused.
Instead of allocating a temporary list just to iterate over it and then
performing a value() lookup, just use iterators instead.
Differential Revision: https://phabricator.kde.org/D1705
With KIOSK restrictions it can happen that a context menu would be empty.
In this case just a shadow would show up. Do nothing then.
Differential Revision: https://phabricator.kde.org/D1627
Summary:
Currently we leak an IconLoader for each icon for the time the system
tray is in memory.
An app may also load icons from their own directories, so we need a new
iconloader that takes this into account
This is wrapped into a subclass of iconengine so the iconloader lifespan
matches the icon object
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1498