Skip to content

kcms/touchpad: Explicit build options for Wayland and X11 backends

[edit: updated MR description based on the reworked commit message]

KDE prefers explicit CMake options over a conditional build that depends on which headers are installed on the user's system. Two new options are introduced to turn the build for the X11 and KWin+Wayland backends on or off separately.

The touchpad KCM will now build both backends by default, as before, but won't silently exclude kcm_touchpad from the build if any of its required X11_XCB/X11_Xi/XORGSERVER dependencies are missing. Instead, it will loudly fail CMake configuration with an error and a hint about the existence of the CMake option.

Plus, don't leak in TouchpadBackend::implementation(). If the X11 implementation keeps a backend singleton and returns that, the KWin+Wayland implementation shouldn't keep creating new backends that are never deleted.


The mouse KCM should get a similar treatment (edit: now available at MR !1626 (merged)), perhaps even keyboard although I'm not sure how hard the X11 dependency is in the latter.

Edited by Jakob Petsovits

Merge request reports

Loading