https://bugs.kde.org/show_bug.cgi?id=488915
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/plasma-workspace/-/commi |ma/powerdevil/-/commit/6f66 |t/43ca4f3bf083651c2ac8b8035 |8270a389322ccdb8b8cc92eea30 |96e3827ed8d5e76 |8d087fca8 --- Comment #20 from Jakob Petsovits <jpe...@petsovits.com> --- Git commit 6f668270a389322ccdb8b8cc92eea308d087fca8 by Jakob Petsovits. Committed on 08/12/2024 at 03:04. Pushed by jpetso into branch 'master'. applets/brightness: Never miss a display on brightness service registration Since commit c8f60bbf, the display list gets updated when the org.kde.ScreenBrightness service (provided by PowerDevil) starts or restarts. This exposed a race condition that was already present, but now gets triggered regularly due to tighter timing. The sequence of events reproducing this bug goes like this: 1. The D-Bus service appears, `onServiceRegistered()` is invoked. 2. `queryAndUpdateDisplays()` starts retrieving display properties. 3. Soon after the D-Bus service came up, it adds another display. 4. `queryAndUpdateDisplays()` finishes. 5. Only at this point we connect to D-Bus display change signals. In this sequence, the display from (3) is missed and won't show up in the applet until another display change happens at a later point. Now that the display model is robust against duplicate insertions, we can simply move `queryAndUpdateDisplays()` from the start of `onServiceRegistered()` to the end of the function, at which point D-Bus signal connections are already set up. This ensures that no display additions will be missed, even if they happen immediately after service startup. Related: bug 486067 M +10 -10 applets/brightness/plugin/screenbrightnesscontrol.cpp https://invent.kde.org/plasma/powerdevil/-/commit/6f668270a389322ccdb8b8cc92eea308d087fca8 -- You are receiving this mail because: You are watching all bug changes.