Summary: | Volume OSD briefly shows 100% instead of correct over-100% value after when adjusting system volume after adjusting app-specific volume from the Media Player widget | ||
---|---|---|---|
Product: | [Unmaintained] plasma-pa | Reporter: | Quinten Kock <quinten> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | isma.af, me, nate, nowrep |
Priority: | NOR | ||
Version First Reported In: | 5.27.8 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=475317 | ||
Latest Commit: | https://invent.kde.org/plasma/kscreenlocker/-/commit/424144f4f8ab594948d69bce3817037bc9e726c1 | Version Fixed In: | |
Sentry Crash Report: |
Description
Quinten Kock
2023-10-02 19:04:07 UTC
Can reproduce in Plasma 6 with those exact steps. So I tried to do a little digging, and it's all very confusing. dbus-monitor shows that plasma-pa seems to be sending the correct value of e.g. 105 to org.kde.osdService (member=osdProgress). In the OSD part of plasma-workspace specifically Osd::showProgress, maximumPercent is used to both bound the value and set osdMaxValue which defines how wide the progress bar is. Strangely, the progress bar does have the correct width?! So it seems that osdMaxValue *is* set correctly, but the value is being incorrectly bound somewhere after being sent over dbus. Very confusing. My best guess is that something goes wrong within plasma-workspace/shell/osd.cpp/showProgress, but I have no certainty for this. Maybe something horrible related to QML? Okay, after attaching Gammaray it seems like the osdValue property is also being set correctly. Perhaps in plasma-workspace we should update the maxValue first and only THEN the value? Perhaps Qt internally limits the progressbar value too, which is then done with the old incorrect limit of 100 which is 'remembered' from the previous OSD (such as media or brightness). Will try and open an MR if it works! A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3595 Git commit 741a0308605a7fd218b12961ec13c77f00777f86 by ivan tkachenko, on behalf of Quinten Kock. Committed on 01/12/2023 at 23:42. Pushed by ratijas into branch 'master'. Osd: set osdMaxValue before osdValue This change fixes incorrect bounded values appearing in the osd, for example 100% when the real volume is 105%. Probably, this happens because osdValue is set to 105 while osdMaxValue=100, which then gets clamped by Qt. By setting osdMaxValue first, Qt clamps with the correct range. M +2 -1 shell/osd.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/741a0308605a7fd218b12961ec13c77f00777f86 Git commit 424144f4f8ab594948d69bce3817037bc9e726c1 by ivan tkachenko. Committed on 02/12/2023 at 02:10. Pushed by ratijas into branch 'master'. Osd: set osdMaxValue before osdValue This change fixes incorrect bounded values appearing in the osd, for example 100% when the real volume is 105%. Probably, this happens because osdValue is set to 105 while osdMaxValue=100, which then gets clamped by Qt. By setting osdMaxValue first, Qt clamps with the correct range. See plasma-workspace@741a0308605a7fd218b12961ec13c77f00777f86 M +2 -1 greeter/greeterapp.cpp https://invent.kde.org/plasma/kscreenlocker/-/commit/424144f4f8ab594948d69bce3817037bc9e726c1 |