https://bugs.kde.org/show_bug.cgi?id=492859

--- Comment #9 from Jakob Petsovits <jpe...@petsovits.com> ---
Git commit 8e698dbcdc9ce95095ea2739713fde05ca4822f5 by Jakob Petsovits.
Committed on 19/09/2024 at 18:06.
Pushed by jpetso into branch 'master'.

applets/batterymonitor: React to D-Bus service (un)register events

Previously, the "Power and Battery" applet only checked for the
presence of PowerDevil's D-Bus services once when it starts up.
This appears to (mostly?) work for applets embedded in a panel,
but does not work for applets on the desktop itself.
Likely there's a timing issue and applets on the desktop start
sooner than PowerDevil will advertise its services.

A better way to work is for the applet to monitor the bus for when
the relevant services appear or disappear. When observing a service
registered or unregistered event, the applet gets set up accordingly.

This fixes the race condition for two out of three applet parts
(power profiles, inhibitions) but does not fix battery status;
the data for that is coming from `BatteryControlModel`
in plasma-workspace. A similar fix will have to be implemented there.
Related: bug 488915, bug 489003, bug 492945

M  +88   -12   applets/batterymonitor/plugin/powermanagementcontrol.cpp
M  +10   -2    applets/batterymonitor/plugin/powermanagementcontrol.h
M  +77   -1    applets/batterymonitor/plugin/powerprofilescontrol.cpp
M  +10   -1    applets/batterymonitor/plugin/powerprofilescontrol.h

https://invent.kde.org/plasma/powerdevil/-/commit/8e698dbcdc9ce95095ea2739713fde05ca4822f5

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to