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

Jakob Petsovits <jpe...@petsovits.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/powerdevil/-/commit/db79
                   |                            |307fdc4fd3ba6ce9e05cf3a0114
                   |                            |f2940e620

--- Comment #6 from Jakob Petsovits <jpe...@petsovits.com> ---
Git commit db79307fdc4fd3ba6ce9e05cf3a0114f2940e620 by Jakob Petsovits.
Committed on 16/01/2025 at 15:56.
Pushed by jpetso into branch 'master'.

daemon: Make sure to load newly supported actions after a refresh

This fixes applying display brightness from the current profile
configuration at startup. This had failed on Wayland since 6.2
when KWin brightness integration was added. Here's why.

In a Wayland session, the `ScreenBrightnessControl` action will not
initially announce itself as supported because KWin outputs are only
known after a brief asynchronous delay. Instead, it gets enabled
as a reaction to the first `displayAdded`/`displayIdsChanged` signal.

The `refreshActions()` slot that handles this would create and
register the action object, but the action's `loadAction()` and
`onProfileLoaded()` methods were not called. Because the profile
was already loaded earlier, these methods would not get called
until the next profile change (or wake-up from sleep).

We now take care to call these action methods, but only when the
profile is active. They won't be called during Core initialization,
and if the login session is currently inactive.

M  +30   -18   daemon/powerdevilcore.cpp
M  +3    -1    daemon/powerdevilcore.h

https://invent.kde.org/plasma/powerdevil/-/commit/db79307fdc4fd3ba6ce9e05cf3a0114f2940e620

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

Reply via email to