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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |ASSIGNED

--- Comment #4 from Jakob Petsovits <jpe...@petsovits.com> ---
I looked into this more and came up with a set of changes to handle the
displayAdded() signal in PowerDevil's ScreenBrightnessControl action. This will
come in handy either way, but it turns out it wasn't the root of the problem
and the theory from Comment #2 is ever so slightly off.

Here's what's actually happening:

1. The KWin/Wayland output for the laptop screen doesn't yet exist on startup.
Therefore, PowerDevil::Core does not load the ScreenBrightnessControl action
initially.
2. PowerDevil loads the current profile, still without the action being active.
Other actions have their loadAction() and onProfileLoad() method called via
PowerDevil::Core::loadProfile().
3. The laptop display appears, and the action now gets loaded in
PowerDevil::Core::refreshActions().
4. However, refreshActions() does not call loadAction() and onProfileLoad() for
newly supported (i.e. added) actions, neither directly nor by invoking
Core::loadProfile(). Therefore, the brightness setting logic doesn't get
executed until the power state actually changes.

So refreshActions() by itself is insufficient to handle the
displayAdded/displayRemoved signals, it also needs to load any newly supported
actions. Let me figure out how best to make that happen.

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

Reply via email to