From 7d849623d574df605cfdb1b9c08a5d82d70b121a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Sat, 31 Aug 2024 18:46:07 +0200 Subject: [PATCH] Fix pre-commit errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some files had pre-commit style issues. Fix them. Signed-off-by: José Expósito Part-of: --- doc/button-debouncing-state-machine.svg | 2 +- doc/touchpad-tap-state-machine.svg | 2 +- doc/user/clickpad-with-right-button.rst | 1 - doc/user/svg/button-debouncing-wave-diagram.svg | 2 +- doc/user/svg/ptraccel-trackpoint.svg | 1 - doc/user/touchpad-pressure-debugging.rst | 1 - doc/user/touchpad-pressure.rst | 1 - doc/user/trackpoint-configuration.rst | 1 - doc/user/trackpoints.rst | 1 - quirks/30-vendor-vmware.quirks | 1 - quirks/50-system-acer.quirks | 2 +- quirks/50-system-sony.quirks | 1 - quirks/50-system-toshiba.quirks | 2 +- test/check-double-macros.h | 1 - test/litest-device-tablet-mode-switch.c | 1 - tools/libinput-analyze-per-slot-delta.man | 2 -- 16 files changed, 5 insertions(+), 17 deletions(-) diff --git a/doc/button-debouncing-state-machine.svg b/doc/button-debouncing-state-machine.svg index d9f30770..279965e0 100644 --- a/doc/button-debouncing-state-machine.svg +++ b/doc/button-debouncing-state-machine.svg @@ -1,3 +1,3 @@ -

Entry states: IS_UP, IS_DOWN

Assumption: state is stored per-button, and OTHER BUTTON events are always processed before the actual button. Stored state per button is a single bit (up/down), a single state for the state machine across the device is sufficient.

Start the state machine with IS_UP or IS_DOWN based on the button's bit, any OTHER BUTTON event will reset it to that state anyway, so the state can be re-used for the new button.

Entry states: IS_UP, IS_DOWN...

Entry state: DISABLED

Only set on devices that have button debouncing disabled. This state is effectively a noop, it just forwards the events as they come in and returns back to the same state.
Entry state: DISABLED...
button
press
button...
button
release
button...
DISABLED
DISABLED
button
press
button...
notify
button
press
notify...
button
release
button...
notify
button
release
notify...
other
button
other...
IS_UP
IS_UP
button
press
button...
IS_DOWN_WAITING
IS_DOWN_WAITING
IS_UP_DELAYING
IS_UP_DELAYING
notify
button
release
notify...
notify
button
press
notify...
IS_UP
IS_UP
notify
button
release
notify...
IS_DOWN_DETECTING_SPURIOUS
IS_DOWN_DETECTING_SPURIOUS
spurious
enabled?
spurious...
no
no
yes
yes
set
timer
set...
notify
button
press
notify...
other
button
other...
enable
spurious
enable...
IS_DOWN
IS_DOWN
IS_DOWN
IS_DOWN
button
release
button...
set
timer
set...
set short
timer
set short...
other
button
other...
IS_UP_DELAYING_SPURIOUS
IS_UP_DELAYING_SPURIOUS
IS_UP_DETECTING_SPURIOUS
IS_UP_DETECTING_SPURIOUS
button
press
button...
timeout
short
timeout...
other
button
other...
timeout
timeout
button
release
button...
timeout
short
timeout...
other
button
other...
timeout
timeout
timeout
timeout
other
button
other...
timeout
timeout
other
button
other...
IS_DOWN_DELAYING
IS_DOWN_DELAYING
notify
button
press
notify...
timeout
timeout
button
press
button...
other
button
other...
notify
button
release
notify...
notify
button
release
notify...
timeout
short
timeout...
button
press
button...
other
button
other...
IS_UP_WAITING
IS_UP_WAITING
button
release
button...
timeout
timeout
other
button
other...
set
timer
set...
set
timer
set...
set
timer
set...
set
timer
set...
set
timer
set...
set short
timer
set short...
set
timer
set...
set short
timer
set short...
Viewer does not support full SVG 1.1
\ No newline at end of file +

Entry states: IS_UP, IS_DOWN

Assumption: state is stored per-button, and OTHER BUTTON events are always processed before the actual button. Stored state per button is a single bit (up/down), a single state for the state machine across the device is sufficient.

Start the state machine with IS_UP or IS_DOWN based on the button's bit, any OTHER BUTTON event will reset it to that state anyway, so the state can be re-used for the new button.

Entry states: IS_UP, IS_DOWN...

Entry state: DISABLED

Only set on devices that have button debouncing disabled. This state is effectively a noop, it just forwards the events as they come in and returns back to the same state.
Entry state: DISABLED...
button
press
button...
button
release
button...
DISABLED
DISABLED
button
press
button...
notify
button
press
notify...
button
release
button...
notify
button
release
notify...
other
button
other...
IS_UP
IS_UP
button
press
button...
IS_DOWN_WAITING
IS_DOWN_WAITING
IS_UP_DELAYING
IS_UP_DELAYING
notify
button
release
notify...
notify
button
press
notify...
IS_UP
IS_UP
notify
button
release
notify...
IS_DOWN_DETECTING_SPURIOUS
IS_DOWN_DETECTING_SPURIOUS
spurious
enabled?
spurious...
no
no
yes
yes
set
timer
set...
notify
button
press
notify...
other
button
other...
enable
spurious
enable...
IS_DOWN
IS_DOWN
IS_DOWN
IS_DOWN
button
release
button...
set
timer
set...
set short
timer
set short...
other
button
other...
IS_UP_DELAYING_SPURIOUS
IS_UP_DELAYING_SPURIOUS
IS_UP_DETECTING_SPURIOUS
IS_UP_DETECTING_SPURIOUS
button
press
button...
timeout
short
timeout...
other
button
other...
timeout
timeout
button
release
button...
timeout
short
timeout...
other
button
other...
timeout
timeout
timeout
timeout
other
button
other...
timeout
timeout
other
button
other...
IS_DOWN_DELAYING
IS_DOWN_DELAYING
notify
button
press
notify...
timeout
timeout
button
press
button...
other
button
other...
notify
button
release
notify...
notify
button
release
notify...
timeout
short
timeout...
button
press
button...
other
button
other...
IS_UP_WAITING
IS_UP_WAITING
button
release
button...
timeout
timeout
other
button
other...
set
timer
set...
set
timer
set...
set
timer
set...
set
timer
set...
set
timer
set...
set short
timer
set short...
set
timer
set...
set short
timer
set short...
Viewer does not support full SVG 1.1
diff --git a/doc/touchpad-tap-state-machine.svg b/doc/touchpad-tap-state-machine.svg index ea188143..f3086d28 100644 --- a/doc/touchpad-tap-state-machine.svg +++ b/doc/touchpad-tap-state-machine.svg @@ -1,3 +1,3 @@ -
(this section exists for [n] = 1, [n] = 2, and [n] = 3)
(this section exists for [n] = 1, [n] = 2, and [n] = 3)
IDLETOUCHfirstfinger downfinger upbutton 1presstimeoutmove > thresholdsecondfinger downTOUCH_2secondfinger upbutton 2pressmove > thresholdtimeoutbutton 1releasebutton 2release[n]FGTAP_TAPPEDtimeoutfirstfinger down[n]FGTAP_DRAGGINGfirstfinger upbutton [n]releaseIDLEthirdfinger downTOUCH_3button 3pressbutton 3releasemove > thresholdIDLEtimeoutfirstfinger upIDLEfourthfinger down[n]FGTAP_DRAGGING_OR_DOUBLETAPtimeoutfirstfinger upbutton [n]releasesecondfinger downmove > thresholdHOLDfirstfinger upsecondfinger downTOUCH_2_HOLDsecondfinger upthirdfinger downTOUCH_3_HOLDfourthfinger downDEADany finger upfourthfinger upany finger upany finger upIDLEif fingercount == 0[n]FGTAP_DRAGGING_2secondfinger downthirdfinger downphysbuttonpressphysbuttonpressbutton [n]release[n]FGTAP_DRAGGING_WAITtimeoutfirstfinger downTOUCH_TOUCHTOUCH_IDLETOUCH_DEADTOUCH_DEADTOUCH_IDLETOUCH_TOUCHTOUCH_IDLETOUCH_IDLETOUCH_TOUCHthat fingerTOUCH_IDLETOUCH_DEADthat fingerTOUCH_IDLETOUCH_TOUCHTOUCH_IDLETOUCH_TOUCHTOUCH_DEADTOUCH_IDLETOUCH_TOUCHTOUCH_TOUCHTOUCH_IDLETOUCH_TOUCHthat fingerTOUCH_IDLETOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEAD[n]FGTAP_DRAGGING_OR_TAPfirstfinger uptimeoutmove > thresholdTOUCH_IDLEdrag lockenabled?
no
no
yes
yes
thumbTOUCH_DEADTOUCH_2_RELEASEsecondfinger uptimeoutmove > thresholdfirstfinger downTOUCH_IDLEfirstfinger upsecondfinger downTOUCH_DEADTOUCH_DEADdragdisabled?
yes
yes
palmeither fingerpalmremaining fingerpalmany fingerpalmthat fingerTOUCH_DEADthat fingerTOUCH_DEADpalmany fingerpalmthat fingerTOUCH_DEADTOUCH_DEADpalmTOUCH_DEADany fingerpalmthat fingerTOUCH_DEADeither fingerpalmthat fingerTOUCH_DEADpalmTOUCH_DEADany fingerpalmthat fingerTOUCH_DEADTOUCH_DEADmove > thresholdmove > thresholdbutton 1press
[n] = 1
[n] = 1
[n] = 1
[n] = 1
no
no
button [n]releaseIDLEdragdisabled?
[n] = 2
[n] = 2
no
no
yes
yes
dragdisabled?
yes
yes
no
no
[n] = 3
[n] = 3
TOUCH_3_RELEASEtimeoutTOUCH_DEADTOUCH_DEADeither fingerpalmthat fingerTOUCH_DEADmove > thresholdthirdfinger downTOUCH_TOUCHTOUCH_3_RELEASE_2remainingfinger upthat fingerTOUCH_IDLEeither finger upthat fingerTOUCH_IDLEsecondfinger downremaining fingerpalmTOUCH_DEADtimeoutfirstfinger upbutton 3pressbutton 3releasebutton 3pressbutton 3releaseeither finger upthat fingerTOUCH_IDLEsecondfinger downbutton [n]releasebutton 3pressbutton 3releaseTOUCH_DEADbutton 3pressbutton 3releasebutton 3pressbutton 3release
Viewer does not support full SVG 1.1
\ No newline at end of file +
(this section exists for [n] = 1, [n] = 2, and [n] = 3)
(this section exists for [n] = 1, [n] = 2, and [n] = 3)
IDLETOUCHfirstfinger downfinger upbutton 1presstimeoutmove > thresholdsecondfinger downTOUCH_2secondfinger upbutton 2pressmove > thresholdtimeoutbutton 1releasebutton 2release[n]FGTAP_TAPPEDtimeoutfirstfinger down[n]FGTAP_DRAGGINGfirstfinger upbutton [n]releaseIDLEthirdfinger downTOUCH_3button 3pressbutton 3releasemove > thresholdIDLEtimeoutfirstfinger upIDLEfourthfinger down[n]FGTAP_DRAGGING_OR_DOUBLETAPtimeoutfirstfinger upbutton [n]releasesecondfinger downmove > thresholdHOLDfirstfinger upsecondfinger downTOUCH_2_HOLDsecondfinger upthirdfinger downTOUCH_3_HOLDfourthfinger downDEADany finger upfourthfinger upany finger upany finger upIDLEif fingercount == 0[n]FGTAP_DRAGGING_2secondfinger downthirdfinger downphysbuttonpressphysbuttonpressbutton [n]release[n]FGTAP_DRAGGING_WAITtimeoutfirstfinger downTOUCH_TOUCHTOUCH_IDLETOUCH_DEADTOUCH_DEADTOUCH_IDLETOUCH_TOUCHTOUCH_IDLETOUCH_IDLETOUCH_TOUCHthat fingerTOUCH_IDLETOUCH_DEADthat fingerTOUCH_IDLETOUCH_TOUCHTOUCH_IDLETOUCH_TOUCHTOUCH_DEADTOUCH_IDLETOUCH_TOUCHTOUCH_TOUCHTOUCH_IDLETOUCH_TOUCHthat fingerTOUCH_IDLETOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEADTOUCH_DEAD[n]FGTAP_DRAGGING_OR_TAPfirstfinger uptimeoutmove > thresholdTOUCH_IDLEdrag lockenabled?
no
no
yes
yes
thumbTOUCH_DEADTOUCH_2_RELEASEsecondfinger uptimeoutmove > thresholdfirstfinger downTOUCH_IDLEfirstfinger upsecondfinger downTOUCH_DEADTOUCH_DEADdragdisabled?
yes
yes
palmeither fingerpalmremaining fingerpalmany fingerpalmthat fingerTOUCH_DEADthat fingerTOUCH_DEADpalmany fingerpalmthat fingerTOUCH_DEADTOUCH_DEADpalmTOUCH_DEADany fingerpalmthat fingerTOUCH_DEADeither fingerpalmthat fingerTOUCH_DEADpalmTOUCH_DEADany fingerpalmthat fingerTOUCH_DEADTOUCH_DEADmove > thresholdmove > thresholdbutton 1press
[n] = 1
[n] = 1
[n] = 1
[n] = 1
no
no
button [n]releaseIDLEdragdisabled?
[n] = 2
[n] = 2
no
no
yes
yes
dragdisabled?
yes
yes
no
no
[n] = 3
[n] = 3
TOUCH_3_RELEASEtimeoutTOUCH_DEADTOUCH_DEADeither fingerpalmthat fingerTOUCH_DEADmove > thresholdthirdfinger downTOUCH_TOUCHTOUCH_3_RELEASE_2remainingfinger upthat fingerTOUCH_IDLEeither finger upthat fingerTOUCH_IDLEsecondfinger downremaining fingerpalmTOUCH_DEADtimeoutfirstfinger upbutton 3pressbutton 3releasebutton 3pressbutton 3releaseeither finger upthat fingerTOUCH_IDLEsecondfinger downbutton [n]releasebutton 3pressbutton 3releaseTOUCH_DEADbutton 3pressbutton 3releasebutton 3pressbutton 3release
Viewer does not support full SVG 1.1
diff --git a/doc/user/clickpad-with-right-button.rst b/doc/user/clickpad-with-right-button.rst index 76c1ca54..18fa40b1 100644 --- a/doc/user/clickpad-with-right-button.rst +++ b/doc/user/clickpad-with-right-button.rst @@ -44,4 +44,3 @@ For reference, some example commits that add such a quirk are: - `bf61ab9bb0694d0ac3d60a7f815779abfe4886e6 `__ - `74fac6d040ac62048882dfb6f73da567ace6a6f5 `__ - `89cd0f990e3bee9906754d6ca8484ed5aa392249 `__ - diff --git a/doc/user/svg/button-debouncing-wave-diagram.svg b/doc/user/svg/button-debouncing-wave-diagram.svg index 7c43c949..374dfc25 100644 --- a/doc/user/svg/button-debouncing-wave-diagram.svg +++ b/doc/user/svg/button-debouncing-wave-diagram.svg @@ -1,4 +1,4 @@ -Button Debouncing Scenarioscurrent modenormal button press and releasephysical buttonapplication current modedebounced button pressphysical buttontimeoutsapplication current modedebounced button releasephysical buttontimeoutsapplication current modedelayed button pressphysical buttontimeoutsapplication current modedelayed button releasephysical buttontimeoutsapplication current modefirst spurious button release physical buttonapplication current modelater spurious button release physical buttontimeoutsapplication current modedelayed release in spurious mode physical buttontimeoutsapplication bounce modespurious mode \ No newline at end of file +Button Debouncing Scenarioscurrent modenormal button press and releasephysical buttonapplication current modedebounced button pressphysical buttontimeoutsapplication current modedebounced button releasephysical buttontimeoutsapplication current modedelayed button pressphysical buttontimeoutsapplication current modedelayed button releasephysical buttontimeoutsapplication current modefirst spurious button release physical buttonapplication current modelater spurious button release physical buttontimeoutsapplication current modedelayed release in spurious mode physical buttontimeoutsapplication bounce modespurious mode diff --git a/doc/user/svg/ptraccel-trackpoint.svg b/doc/user/svg/ptraccel-trackpoint.svg index f87244dc..13d4b9ce 100644 --- a/doc/user/svg/ptraccel-trackpoint.svg +++ b/doc/user/svg/ptraccel-trackpoint.svg @@ -208,4 +208,3 @@ - diff --git a/doc/user/touchpad-pressure-debugging.rst b/doc/user/touchpad-pressure-debugging.rst index 58837d3a..a96a4822 100644 --- a/doc/user/touchpad-pressure-debugging.rst +++ b/doc/user/touchpad-pressure-debugging.rst @@ -223,4 +223,3 @@ the need for a restart. Once the touch size ranges are deemed correct, :ref:`reporting_bugs` "report a bug" to get the thresholds into the repository. - diff --git a/doc/user/touchpad-pressure.rst b/doc/user/touchpad-pressure.rst index 7e9793b8..53d4f9b2 100644 --- a/doc/user/touchpad-pressure.rst +++ b/doc/user/touchpad-pressure.rst @@ -56,4 +56,3 @@ these axes are supposed to be mapped, few devices forward reliable information. libinput uses these values together with a device-specific :ref:`device-quirks` entry. In other words, touch size detection does not work unless a device quirk is present for the device. - diff --git a/doc/user/trackpoint-configuration.rst b/doc/user/trackpoint-configuration.rst index 85932ec1..a1f8b1d5 100644 --- a/doc/user/trackpoint-configuration.rst +++ b/doc/user/trackpoint-configuration.rst @@ -152,4 +152,3 @@ has been removed. See :ref:`trackpoint_multiplier` for versions 1.12.x and later If using libinput version 1.11.x or earlier, please see `the 1.11.0 documentation `_ - diff --git a/doc/user/trackpoints.rst b/doc/user/trackpoints.rst index 4a9b5215..adb0e718 100644 --- a/doc/user/trackpoints.rst +++ b/doc/user/trackpoints.rst @@ -65,4 +65,3 @@ sufficient pressure to even get close to the maximum ranges. libinput provides a :ref:`Magic Trackpoint Multiplier ` to normalize the trackpoint input data. - diff --git a/quirks/30-vendor-vmware.quirks b/quirks/30-vendor-vmware.quirks index 5a3d90e1..6bd0de11 100644 --- a/quirks/30-vendor-vmware.quirks +++ b/quirks/30-vendor-vmware.quirks @@ -7,4 +7,3 @@ ModelBouncingKeys=1 [VMware VMware Virtual USB Mouse] MatchName=*VMware VMware Virtual USB Mouse* ModelBouncingKeys=1 - diff --git a/quirks/50-system-acer.quirks b/quirks/50-system-acer.quirks index 80b0c702..fcac08eb 100644 --- a/quirks/50-system-acer.quirks +++ b/quirks/50-system-acer.quirks @@ -6,4 +6,4 @@ ModelTabletModeNoSuspend=1 [Acer Spin 5] MatchName=AT Translated Set 2 keyboard MatchDMIModalias=dmi:*svnAcer:pnSpinSP513-52N:* -ModelTabletModeNoSuspend=1 \ No newline at end of file +ModelTabletModeNoSuspend=1 diff --git a/quirks/50-system-sony.quirks b/quirks/50-system-sony.quirks index 22b08ff8..502fa14a 100644 --- a/quirks/50-system-sony.quirks +++ b/quirks/50-system-sony.quirks @@ -5,4 +5,3 @@ MatchUdevType=touchpad MatchName=*SynPS/2 Synaptics TouchPad MatchDMIModalias=dmi:*svnSonyCorporation:pnVPCEG* AttrPressureRange=45:40 - diff --git a/quirks/50-system-toshiba.quirks b/quirks/50-system-toshiba.quirks index 9eba411d..713b3e67 100644 --- a/quirks/50-system-toshiba.quirks +++ b/quirks/50-system-toshiba.quirks @@ -1,4 +1,4 @@ [Toshiba Satellite L855-14E Touchpad] MatchName=*SynPS/2 Synaptics TouchPad MatchDMIModalias=dmi:*svnTOSHIBA:pnSATELLITEL855* -AttrPressureRange=45:44 \ No newline at end of file +AttrPressureRange=45:44 diff --git a/test/check-double-macros.h b/test/check-double-macros.h index 8346c144..7418b90f 100644 --- a/test/check-double-macros.h +++ b/test/check-double-macros.h @@ -90,4 +90,3 @@ #define ck_assert_double_le(X, Y) _ck_assert_double_eq_op(X, <=, Y) #define ck_assert_double_gt(X, Y) _ck_assert_double_ne_op(X, >, Y) #define ck_assert_double_ge(X, Y) _ck_assert_double_eq_op(X, >=, Y) - diff --git a/test/litest-device-tablet-mode-switch.c b/test/litest-device-tablet-mode-switch.c index e677ddf4..ce2d6655 100644 --- a/test/litest-device-tablet-mode-switch.c +++ b/test/litest-device-tablet-mode-switch.c @@ -63,4 +63,3 @@ TEST_DEVICE("tablet-mode-switch-unreliable", { NULL }, } ) - diff --git a/tools/libinput-analyze-per-slot-delta.man b/tools/libinput-analyze-per-slot-delta.man index b4c3e379..8fc198d4 100644 --- a/tools/libinput-analyze-per-slot-delta.man +++ b/tools/libinput-analyze-per-slot-delta.man @@ -83,5 +83,3 @@ currently down. Part of the .B libinput(1) suite - -