summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-02-19 14:41:50 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-02-21 15:13:08 +1000
commit56fd0714129f66632daf38a3e1e683991d67a787 (patch)
tree304813c5d8826d62188c324806b7ca7a02c424a2
parentda74aab7f7db5639a34c98e6bbe44d65df325d4f (diff)
evdev: pass the time down to toggle_touch
Currently unused, will be used in later patches Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev-fallback.c3
-rw-r--r--src/evdev-mt-touchpad.c3
-rw-r--r--src/evdev-tablet.c18
-rw-r--r--src/evdev.h3
4 files changed, 18 insertions, 9 deletions
diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c
index 51cb2d60..03f10a85 100644
--- a/src/evdev-fallback.c
+++ b/src/evdev-fallback.c
@@ -1050,7 +1050,8 @@ fallback_interface_sync_initial_state(struct evdev_device *device,
static void
fallback_interface_toggle_touch(struct evdev_dispatch *evdev_dispatch,
struct evdev_device *device,
- bool enable)
+ bool enable,
+ uint64_t time)
{
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
bool ignore_events = !enable;
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index dfc975e7..3b11343e 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2304,7 +2304,8 @@ evdev_tag_touchpad(struct evdev_device *device,
static void
tp_interface_toggle_touch(struct evdev_dispatch *dispatch,
struct evdev_device *device,
- bool enable)
+ bool enable,
+ uint64_t time)
{
struct tp_dispatch *tp = tp_dispatch(dispatch);
bool arbitrate = !enable;
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index c2de8ac8..82524114 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1600,7 +1600,8 @@ tablet_flush(struct tablet_dispatch *tablet,
static inline void
tablet_set_touch_device_enabled(struct evdev_device *touch_device,
- bool enable)
+ bool enable,
+ uint64_t time)
{
struct evdev_dispatch *dispatch;
@@ -1611,12 +1612,14 @@ tablet_set_touch_device_enabled(struct evdev_device *touch_device,
if (dispatch->interface->toggle_touch)
dispatch->interface->toggle_touch(dispatch,
touch_device,
- enable);
+ enable,
+ time);
}
static inline void
tablet_toggle_touch_device(struct tablet_dispatch *tablet,
- struct evdev_device *tablet_device)
+ struct evdev_device *tablet_device,
+ uint64_t time)
{
bool enable_events;
@@ -1628,7 +1631,9 @@ tablet_toggle_touch_device(struct tablet_dispatch *tablet,
tablet_has_status(tablet,
TABLET_TOOL_OUT_OF_PROXIMITY);
- tablet_set_touch_device_enabled(tablet->touch_device, enable_events);
+ tablet_set_touch_device_enabled(tablet->touch_device,
+ enable_events,
+ time);
}
static inline void
@@ -1782,7 +1787,7 @@ tablet_process(struct evdev_dispatch *dispatch,
break;
case EV_SYN:
tablet_flush(tablet, device, time);
- tablet_toggle_touch_device(tablet, device);
+ tablet_toggle_touch_device(tablet, device, time);
tablet_reset_state(tablet);
break;
default:
@@ -1800,8 +1805,9 @@ tablet_suspend(struct evdev_dispatch *dispatch,
{
struct tablet_dispatch *tablet = tablet_dispatch(dispatch);
struct libinput *li = tablet_libinput_context(tablet);
+ uint64_t now = libinput_now(li);
- tablet_set_touch_device_enabled(tablet->touch_device, true);
+ tablet_set_touch_device_enabled(tablet->touch_device, true, now);
if (!tablet_has_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY)) {
tablet_set_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY);
diff --git a/src/evdev.h b/src/evdev.h
index a0ae6f7a..162adecb 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -325,7 +325,8 @@ struct evdev_dispatch_interface {
* enable/disable touch capabilities */
void (*toggle_touch)(struct evdev_dispatch *dispatch,
struct evdev_device *device,
- bool enable);
+ bool enable,
+ uint64_t now);
/* Return the state of the given switch */
enum libinput_switch_state