D17577: Support for libinput Clickfinger and areas method
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
davidedmundson added a comment.
Good start. Thanks.
INLINE COMMENTS
> device.cpp:364
>
> +void Device::setClickMethod(bool set , enum libinput_config_click_method method)
> +{
Current we switch modes, but there's also a:
LIBINPUT_CONFIG_CLICK_METHOD_NONE
Is there a need for the KCM to ever set libinput to this?
----
If so as a general rule exposing a 3 state enum states as 2 bools can lead to things becoming more complicated. Especially if we have async connections to the config.
> device.cpp:366
> +{
> + if(!(m_supportedClickMethods & method)) {
> + return;
In terms of whitespace we follow:
https://community.kde.org/Policies/Kdelibs_Coding_Style#Whitespace
> device.h:405
> + bool defaultClickMethodClickfinger() const {
> + return (m_defaultClickMethod & LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER);
> + }
The default and current methods are a single enum value not flags.
i.e we can just compare here.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D17577
To: atulbi, #kwin
Cc: davidedmundson, kwin, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart