https://bugs.kde.org/show_bug.cgi?id=493844
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas |ma/powerdevil/-/commit/7e69 |ma/powerdevil/-/commit/ea91 |b58422bfb6fd99dbc422a00cbe8 |fa1ba728ba387c81c5cce2fde1c |7579b1116 |a34c0c83f --- Comment #14 from Jakob Petsovits <jpe...@petsovits.com> --- Git commit ea91fa1ba728ba387c81c5cce2fde1ca34c0c83f by Jakob Petsovits. Committed on 08/10/2024 at 04:31. Pushed by jpetso into branch 'Plasma/6.2'. applets/brightness: Avoid producing duplicate display sliders Sometimes a display configuration change results in more than one change signal. These can happen in quick succession of each other. The async code in ScreenBrightnessControl had a problem with this, because it would sometimes interleave parts of its model update function with another call of the same function. This would cause duplicate brightness sliders to appear for the same display. The solution is to make sure we don't try to update the model while another update is already running. One approach would be to simply take QCoro and async calls out in favor of synchronous calls which are easier to reason about. However, this would mean we block plasmashell for a longer time. Instead, this commit introduces a call guard to the update function which prevents another asynchronous call from entering its main body of code while an existing update is already in the works. After the update has finished, we will repeat the update process in case another update request had been issued in the meantime. (cherry picked from commit 7e69b58422bfb6fd99dbc422a00cbe87579b1116) Co-authored-by: Jakob Petsovits <jpe...@petsovits.com> M +32 -19 applets/brightness/plugin/screenbrightnesscontrol.cpp M +3 -2 applets/brightness/plugin/screenbrightnesscontrol.h https://invent.kde.org/plasma/powerdevil/-/commit/ea91fa1ba728ba387c81c5cce2fde1ca34c0c83f -- You are receiving this mail because: You are watching all bug changes.