Bug 455802 - "Manually block" checkbox state not shared between multiple widgets
Summary: "Manually block" checkbox state not shared between multiple widgets
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Battery Monitor (show other bugs)
Version: 5.24.5
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 470913 473519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-22 18:55 UTC by spamulousbastard+kde
Modified: 2023-09-19 21:28 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spamulousbastard+kde 2022-06-22 18:55:23 UTC
On a system with multiple system trays, if the "Power Management" system tray applet is used to manually disable screen locking, it can't be re-enabled from any system tray other than the one that enabled it.

STEPS TO REPRODUCE
1. Create a 2nd default panel with a 2nd system tray (such as on a multi-monitor machine).
2. Expand the 1st system tray.
3. Click the "Power Management" applet.
4. Tick the "Manually block sleep and screen locking" checkbox.
5. Expand the 2nd system tray.
6. Click the "Power Management" applet.
7. Look at the checkbox.

OBSERVED RESULT

The box in the 2nd applet is not checked.

EXPECTED RESULT

The box in the 2nd applet should be checked.  Screen lock inhibition is session-wide.  It should not be necessary to try every screen's panel's systray applet to find the one that is inhibiting the lock.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora 36
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2023-08-22 22:32:28 UTC
*** Bug 473519 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2023-09-15 16:41:49 UTC
*** Bug 470913 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2023-09-17 03:18:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3294
Comment 4 Natalie Clarius 2023-09-18 15:16:59 UTC
Git commit de5a5dbf63c5d1fb91c1cf3a3f45553b9cca417b by Natalie Clarius.
Committed on 18/09/2023 at 17:04.
Pushed by nclarius into branch 'master'.

{applets, dataengines}/battery: sync manual inhibition state

With the "manually block" switch, up until now instances of the power applet would each request their own inhibition from the fd.o service, so state and toggleability were not synced. To fix this,
- handle the cookies for the inhibition requests in the data engine, so each applet would access the same inhibition to undo,
- add a listener to changes and a data key for the inhibition status, so applets could show the current state appropriately,
- uncouple the switch state from the toggle action, so one instance could request the (un)inhibition while all get their state updated.

M  +2    -0    applets/batterymonitor/package/contents/ui/PopupDialog.qml
M  +7    -1    applets/batterymonitor/package/contents/ui/PowerManagementItem.qml
M  +4    -20   applets/batterymonitor/package/contents/ui/main.qml
M  +37   -3    dataengines/powermanagement/powermanagementengine.cpp
M  +1    -0    dataengines/powermanagement/powermanagementengine.h
M  +4    -6    dataengines/powermanagement/powermanagementjob.cpp
M  +2    -0    dataengines/powermanagement/powermanagementjob.h
M  +0    -6    dataengines/powermanagement/powermanagementservice.operations

https://invent.kde.org/plasma/plasma-workspace/-/commit/de5a5dbf63c5d1fb91c1cf3a3f45553b9cca417b