We have had multiple accounts of people accidentally breaking their stylus input (like https://invent.kde.org/teams/goals/we-care-about-your-input/-/issues/12) because it isn't immediately obvious the calibration matrix is the issue. While we can make it harder to generate invalid calibration matrices, the UX in general is not great. Unlike the other settings, calibration is hidden away in a dialog and it does not say anywhere that you have a custom calibration matrix set or how to reset it. Users have to guess that the "reset" and "defaults" buttons must be hit to do this.
Nico pointed out that the KCM should support the "highlight changed setting" thingie that's already present in system settings.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2626
Git commit d3044f9be079e530e82c9eca967365424843a0c3 by Joshua Goins. Committed on 10/11/2024 at 02:14. Pushed by redstrate into branch 'master'. kcms/tablet: Begin to highlight settings if they're changed from defaults This doesn't affect the calibration settings just yet, due to some issues reading the calibration matrix from D-Bus. Other settings such as button bindings, mapping modes, orientation and left-handed are now highlighted. M +2 -1 kcms/tablet/ui/PressureCurve.qml M +23 -0 kcms/tablet/ui/main.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/d3044f9be079e530e82c9eca967365424843a0c3
I think my plan for this is to drop the QMatrix4x4 in Dbus, it's just too hard to support. If it was a string (like the pressure curve) then this is trivial.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2676
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6936
Git commit c76a544639f109e679b7dc97423905af380ca6a6 by Joshua Goins. Committed on 26/12/2024 at 01:56. Pushed by redstrate into branch 'master'. backends/libinput: Turn calibration matrix property into a string Transporting a QMatrix4x4 over D-Bus is difficult, not really helped by QtDBus. The property doesn't show up in the generated QtDBus interface for example. Using QMatrix4x4 also introduced subtle but hard to fix bugs due to the nature of how QtDBus serialization worked (or doesn't work, usually.) Now the property uses QString-based serialization ala the pressure curve property. This is backwards-compatible with existing config values too. M +31 -38 src/backends/libinput/device.cpp M +13 -6 src/backends/libinput/device.h https://invent.kde.org/plasma/kwin/-/commit/c76a544639f109e679b7dc97423905af380ca6a6
Git commit e0a185353fcdcc9cc7ac8643a7aceede7cee8e53 by Joshua Goins. Committed on 26/12/2024 at 02:23. Pushed by redstrate into branch 'master'. kcms/tablet: Highlight the calibration matrix as changed, use better UX Now it acts like a proper setting, being saved/restored like any other setting in this KCM. Also, it's now highlighted when it's changed. M +34 -7 kcms/libkwindevices/inputdevice.cpp M +20 -9 kcms/libkwindevices/inputdevice.h M +0 -29 kcms/tablet/kcmtablet.cpp M +4 -0 kcms/tablet/ui/StylusTab.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/e0a185353fcdcc9cc7ac8643a7aceede7cee8e53