Bug 432618

Summary: Virtual Desktop settings app always sets on-screen display time to 0ms
Product: [Applications] systemsettings Reporter: safield14
Component: kcm_kwinvirtualdesktopsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, nate, nicolas.fella, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.20.5   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.22
Sentry Crash Report:

Description safield14 2021-02-07 18:49:00 UTC
SUMMARY
When I try to set the 'Show on-screen diplay when switching' value, in the virtual desktop settings, it always gets forced to 0ms when I hit apply.

STEPS TO REPRODUCE
1. Open 'Virtual Desktops'
2. Check "Show on screen display when switching'
3. Enter a time value of 1000ms
4. Hit apply.

OBSERVED RESULT
Time value goes to 0ms

EXPECTED RESULT
Time value stays at 1000ms.

Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-65-generic
OS Type: 64-bit
Graphics Processor: Radeon RX 570 Series
Comment 1 Nate Graham 2021-02-08 19:35:32 UTC
Huh, works for me.
Comment 2 Patrick Silva 2021-05-21 13:18:45 UTC
I can reproduce when I edit time value with keyboard.

STEPS TO REPRODUCE
1. Open 'Virtual Desktops'
2. Check "Show on screen display when switching'
3. use keyboard to enter a time value of 1000ms
4. click on another KCM (Apply button is greyed out)
5. click on Apply button of save/discard dialog
6. go back to Virtual Desktops KCM

Result: time value is 0 ms

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Graphics Platform: X11
Comment 3 Nicolas Fella 2021-05-22 11:32:53 UTC
Fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/1024
Comment 4 Nate Graham 2021-05-24 19:13:12 UTC
Git commit 5484b846b3869a8adca4cf801ca296b94017179e by Nate Graham, on behalf of David Edmundson.
Committed on 24/05/2021 at 18:51.
Pushed by ngraham into branch 'master'.

[kcmkwin/kwindesktop] Implement valueFromText in a spinbox

If textFromValue is set, valueFromText must be.

A lot of other implemenetations were using parseInt() which fails at
reading "3,000" due to the comma. Qt's fromLocaleString handles that but
needs any text stripping.

This implementation isn't perfect, but really we need to work on a good
upstream solution.

M  +1    -0    src/kcmkwin/kwindesktop/package/contents/ui/main.qml

https://invent.kde.org/plasma/kwin/commit/5484b846b3869a8adca4cf801ca296b94017179e
Comment 5 Nate Graham 2021-05-24 19:13:38 UTC
Git commit b8580339b44e376dbf035cb7a93096f71319ee54 by Nate Graham, on behalf of David Edmundson.
Committed on 24/05/2021 at 19:11.
Pushed by ngraham into branch 'Plasma/5.22'.

[kcmkwin/kwindesktop] Implement valueFromText in a spinbox

If textFromValue is set, valueFromText must be.

A lot of other implemenetations were using parseInt() which fails at
reading "3,000" due to the comma. Qt's fromLocaleString handles that but
needs any text stripping.

This implementation isn't perfect, but really we need to work on a good
upstream solution.


(cherry picked from commit 5484b846b3869a8adca4cf801ca296b94017179e)

M  +1    -0    src/kcmkwin/kwindesktop/package/contents/ui/main.qml

https://invent.kde.org/plasma/kwin/commit/b8580339b44e376dbf035cb7a93096f71319ee54