summaryrefslogtreecommitdiff
path: root/user/xf86-input-synaptics/input-event.patch
blob: 38b620f09d4a18d34d2f44eb976c2ac1b8423a01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- xf86-input-synaptics-1.9.1/src/eventcomm.c.old	2018-05-29 03:18:45.000000000 +0000
+++ xf86-input-synaptics-1.9.1/src/eventcomm.c	2020-01-22 02:18:05.881867288 +0000
@@ -575,9 +575,12 @@
         ev->type = EV_SYN;
         ev->code = SYN_REPORT;
         ev->value = 0;
-        ev->time = last_event_time;
-    } else if (ev->type == EV_SYN)
-        last_event_time = ev->time;
+        ev->input_event_sec = last_event_time.tv_sec;
+        ev->input_event_usec = last_event_time.tv_usec;
+    } else if (ev->type == EV_SYN) {
+        last_event_time.tv_sec = ev->input_event_sec;
+        last_event_time.tv_usec = ev->input_event_usec;
+    }
 
     return TRUE;
 }
@@ -725,7 +728,7 @@
             case SYN_REPORT:
                 hw->numFingers = count_fingers(pInfo, comm);
                 if (proto_data->have_monotonic_clock)
-                    hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000;
+                    hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000;
                 else
                     hw->millis = GetTimeInMillis();
                 SynapticsCopyHwState(hwRet, hw);