summaryrefslogtreecommitdiff
path: root/src/evdev-tablet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev-tablet.c')
-rw-r--r--src/evdev-tablet.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 021907f8..f3895fdd 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1657,12 +1657,15 @@ static void
tablet_proximity_out_quirk_timer_func(uint64_t now, void *data)
{
struct tablet_dispatch *tablet = data;
+ struct timeval tv = us2tv(now);
struct input_event events[2] = {
- { .time = us2tv(now),
+ { .input_event_sec = tv.tv_sec,
+ .input_event_usec = tv.tv_usec,
.type = EV_KEY,
.code = BTN_TOOL_PEN,
.value = 0 },
- { .time = us2tv(now),
+ { .input_event_sec = tv.tv_sec,
+ .input_event_usec = tv.tv_usec,
.type = EV_SYN,
.code = SYN_REPORT,
.value = 0 },
@@ -1729,9 +1732,10 @@ tablet_proximity_quirk_update(struct tablet_dispatch *tablet,
/* If the timer function forced prox out before,
fake a BTN_TOOL_PEN event */
if (tablet->quirks.proximity_out_forced) {
-
+ struct timeval tv = us2tv(time);
struct input_event fake_event = {
- .time = us2tv(time),
+ .input_event_sec = tv.tv_sec,
+ .input_event_usec = tv.tv_usec,
.type = EV_KEY,
.code = BTN_TOOL_PEN,
.value = 1,