[PATCH libinput v3 4/4] test: add tests for lid switch

2017-01-19 Thread James Ye
Signed-off-by: James Ye --- Changes since v2: - rebased off master - renamed lid.c to test-lid.c test/Makefile.am| 4 +- test/litest-device-lid-switch.c | 58 + test/litest.c | 30 + test/litest.h | 11 ++ test/test-device.c

[PATCH libinput v3 0/4] Disable laptop touchpad on lid close

2017-01-19 Thread James Ye
lid_switch_process set 4 (now set 3): - check if event is a switch event set 5 (now set 4): - rebased off master - renamed lid.c to test-lid.c Cheers, James [1]: https://lists.freedesktop.org/archives/wayland-devel/2016-January/026349.html [2]: https://github.com/systemd/systemd/pull/5057 James

[PATCH libinput v3 2/4] Add evdev_dispatch interface for lid switch

2017-01-19 Thread James Ye
Create a lid_switch_interface to handle lid switch events, so the touchpad can be disabled when lid is closed. Signed-off-by: James Ye --- Changes since v2: - check for SW_LID in lid_switch_process src/evdev.c | 107 ++-- src/evdev.h

[PATCH libinput v3 1/4] Add a "switch" interface for parts of the SW_* range

2017-01-19 Thread James Ye
event. See https://bugs.freedesktop.org/show_bug.cgi?id=86223 This features is intended to be the main driver for the interface. Co-Authored-By: Peter Hutterer Signed-off-by: James Ye --- Changes since v2: - removed tablet mode enum doc/Makefile.am| 1 + doc/switches.dox | 16

[PATCH libinput v3 3/4] Pair touchpad and lid_switch for disable

2017-01-19 Thread James Ye
Add listener for lid switch events, disable touchpad on switch event. Signed-off-by: James Ye --- Changes since v2: - check if event is a switch event src/evdev-mt-touchpad.c | 49 + src/evdev-mt-touchpad.h | 5 + 2 files changed, 54

Re: [PATCH libinput 0/5] Disable laptop touchpad on lid close

2017-01-13 Thread James Ye
On Thu, Jan 5, 2017 at 4:15 PM, James Ye wrote: Although a laptop touchpad is usually not accessible when the lid is closed, some laptop models suffer from a hardware bug where the touchpad can be activated even if the lid is closed. This bug can be worked around by disabling the touchpad

[PATCH libinput v2 4/5] Pair touchpad and lid_switch for disable

2017-01-09 Thread James Ye
Add listener for lid switch events, disable touchpad on switch event. Signed-off-by: James Ye --- src/evdev-mt-touchpad.c | 47 +++ src/evdev-mt-touchpad.h | 5 + 2 files changed, 52 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev

[PATCH libinput v2 3/5] Add evdev_dispatch interface for lid switch

2017-01-09 Thread James Ye
Create a lid_switch_interface to handle lid switch events, so the touchpad can be disabled when lid is closed. Signed-off-by: James Ye --- Changes since v1: - style and text fixes src/evdev.c | 94 +++-- src/evdev.h | 8 ++ 2 files

[PATCH libinput v2 5/5] test: add tests for lid switch

2017-01-09 Thread James Ye
Signed-off-by: James Ye --- Changes since v1: - test switch type in litest_is_switch_event() - test duplicate switch events - event conversion test - improved scroll interrupt test test/Makefile.am| 4 +- test/lid.c | 263

[PATCH libinput v2 2/5] Add a "switch" interface for parts of the SW_* range

2017-01-09 Thread James Ye
also receive the event. See https://bugs.freedesktop.org/show_bug.cgi?id=86223 This features is intended to be the main driver for the interface. Co-Authored-By: Peter Hutterer Signed-off-by: James Ye --- Changes since v1: - minor doxygen fixes - missing @defgroup event_switch - missing

[PATCH libinput v2 1/5] udev: mark switches as input devices

2017-01-09 Thread James Ye
Signed-off-by: James Ye --- udev/90-libinput-model-quirks.hwdb | 6 ++ 1 file changed, 6 insertions(+) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index eb74f61..f038144 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model

[PATCH libinput v2 0/5] Disable laptop touchpad on lid close

2017-01-09 Thread James Ye
- updated commit message set 3: - style and text fixes - updated commit message set 5: - improved tests - added duplicate event test - added event conversion test Cheers, James [1]: https://lists.freedesktop.org/archives/wayland-devel/2016-January/026349.html James Ye (5): udev: mark switches

[PATCH libinput 3/5] Add evdev_dispatch interface for lid switch

2017-01-04 Thread James Ye
Create a lid_switch_interface to handle lid switch events, so touchpad can be disabled when lid is closed. --- src/evdev.c | 92 +++-- src/evdev.h | 8 ++ 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/src/evdev.c b/src/

[PATCH libinput 4/5] Pair touchpad and lid_switch for disable

2017-01-04 Thread James Ye
Add listener for lid switch events, disable touchpad on switch event. --- src/evdev-mt-touchpad.c | 47 +++ src/evdev-mt-touchpad.h | 5 + 2 files changed, 52 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index f437c2

[PATCH libinput 5/5] test: add tests for lid switch

2017-01-04 Thread James Ye
lid.c @@ -0,0 +1,228 @@ +/* + * Copyright © 2017 James Ye + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without li

[PATCH libinput 2/5] Add a "switch" interface for parts of the SW_* range

2017-01-04 Thread James Ye
Adapted from: https://lists.freedesktop.org/archives/wayland-devel/2016-January/026349.html --- doc/Makefile.am| 1 + doc/switches.dox | 13 ++ src/libinput-private.h | 5 +++ src/libinput.c | 103 +++ src/libinput.h

[PATCH libinput 1/5] udev: mark switches as input devices

2017-01-04 Thread James Ye
--- udev/90-libinput-model-quirks.hwdb | 6 ++ 1 file changed, 6 insertions(+) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index eb74f61..f038144 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -15,6 +15,12

[PATCH libinput 0/5] Disable laptop touchpad on lid close

2017-01-04 Thread James Ye
patch to mark switches as input devices (needs to go to systemd) 2: switch interface[1] 3: evdev dispatch interface for laptop lid switches 4: mechanism for pairing touchpad with lid, and disabling the touchpad 5: test cases Best regards, James Ye [1]: https://lists.freedesktop.org/archives