Skip to content

kcms/touchpad: Remove auto-disable functionality from kded

Jakob Petsovits requested to merge work/jpetso/touchpad-kded-descope into master

The X11-only touchpad kded contained code to monitor for keyboard events, as well as mouse plug-in events, upon which the touchpad would be automatically enabled or disabled accordingly.

This is not necessary anymore now that we only support libinput, and we let the user configure both its "disable while typing" and "disable while mouse is connected" features.

If the user had a config with non-default settings for auto-disable, those are now migrated to their appropriate X11 config.

The remaining manual touchpad on/off/toggle shortcuts continue to work on X11 only, whereas KWin itself implements them on Wayland.


13 files changed, 62 insertions(+), 753 deletions(-) 😃

CC @nicolasfella, @redstrate, @duha


I pulled in the method renaming commit from !2689 (merged) and retargeted to master, with a hope of still cherry-picking to 6.3 whereas !2689 (merged) is now 6.4 only.

Before deciding to do it that way, I tried rebasing to master without the method renaming commit. But then we get a QObject* list from getDevices() instead of a LibinputCommon* list from inputDevices() and that's not great for the migration code. Imho the extra commit is low enough complexity (with a justifyable amount of testing) that cherry-picking into 6.3 is fine. Feel free to disagree. Commit message:

kcms/touchpad: Name backend device methods similar to kcm_mouse

Along the way, we can use the now-type-registered LibinputCommon base device class in QML by name, instead of generic QtObject.

With inspiration from commit de641893 and other refactorings by @ratijas.

Testing

Note that I already performed the full round of testing described below on my system, on Wayland and on X11.

Migration

Only migrates and uses the old settings in an X11 session.

Take an "old" ~/.config/touchpadrc with the following non-default settings:

[autodisable]
DisableOnKeyboardActivity=false
DisableWhenMousePluggedIn=true

Or use whatever is different than your current settings. Instead of touchpadrc, Plasma 6 uses touchpadxlibinputrc for X11 (and kcminputrc for KWin/Wayland), which is what you actually see represented in the Touchpad KCM.

After a rebuild with the patch applied, log out and back in, then find your old settings applied to the Plasma 6 config.

Shortcuts

The default shortcuts are set only to dedicated laptop keys for touchpad on/off/toggle. My laptop does not seem to have one of those. If you want to test them on systems like mine (again, the kded is only active on X11, KWin/Wayland handles the same shortcuts natively) then you have to assign a secondary shortcut for these actions in the "Touchpad" category.

Edited by Jakob Petsovits

Merge request reports

Loading