Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / lib / libinput
Commits:
-
89cd0f99
by Sean Rhodes at 2021-10-04T10:19:52+01:00
-
cf929e98
by José Expósito at 2021-10-07T08:34:43+02:00
-
34bab6e1
by Eduardo de Souza Cruz at 2021-10-10T23:32:36+00:00
-
f2d110df
by Sean Rhodes at 2021-10-11T07:19:39+00:00
-
f5c20fe6
by Eduardo de Souza Cruz at 2021-10-11T17:43:26-03:00
-
9b77661e
by Travis Wrightsman at 2021-10-11T19:23:20-04:00
-
e2d4e055
by Peter Hutterer at 2021-10-19T13:05:00+10:00
-
74fac6d0
by A-w-x at 2021-10-20T16:18:33+02:00
-
ac385e12
by Peter Hutterer at 2021-10-21T14:19:49+10:00
7 changed files:
- meson.build
- + quirks/30-vendor-starlabs.quirks
- + quirks/50-system-gpd.quirks
- quirks/50-system-purism.quirks
- src/evdev-mt-touchpad-gestures.c
- src/evdev.c
- test/test-log.c
Changes:
1 | 1 |
project('libinput', 'c',
|
2 |
- version : '1.19.1',
|
|
2 |
+ version : '1.19.2',
|
|
3 | 3 |
license : 'MIT/Expat',
|
4 | 4 |
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
5 | 5 |
meson_version : '>= 0.49.0')
|
1 |
+[StarBook Mk V]
|
|
2 |
+MatchName=STAR0001:00 093A:0255 Touchpad
|
|
3 |
+MatchUdevType=touchpad
|
|
4 |
+MatchDMIModalias=dmi:*svnStarLabs:pnStarBook*
|
|
5 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
6 |
+ |
|
7 |
+[StarLabTop Mk IV - coreboot firmware]
|
|
8 |
+MatchName=STAR0001:00 093A:1336 Touchpad
|
|
9 |
+MatchUdevType=touchpad
|
|
10 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLabTop*
|
|
11 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
12 |
+ |
|
13 |
+[StarLabTop Mk IV - AMI firmware]
|
|
14 |
+MatchName=PCT1336:00 093A:1336 Touchpad
|
|
15 |
+MatchUdevType=touchpad
|
|
16 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLabTop*
|
|
17 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
18 |
+ |
|
19 |
+[StarLite Mk III - coreboot firmware]
|
|
20 |
+MatchName=STAR0001:00 093A:0255 Touchpad
|
|
21 |
+MatchUdevType=touchpad
|
|
22 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLite*
|
|
23 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
24 |
+ |
|
25 |
+[StarLite Mk III - AMI firmware]
|
|
26 |
+MatchName=HTIX5288:00 093A:0255 Touchpad
|
|
27 |
+MatchUdevType=touchpad
|
|
28 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLite*
|
|
29 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
30 |
+ |
|
31 |
+[StarLite Mk II - coreboot firmware]
|
|
32 |
+MatchName=STAR0001:00 0911:5288 Touchpad
|
|
33 |
+MatchUdevType=touchpad
|
|
34 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLite*
|
|
35 |
+AttrEventCodeDisable=BTN_RIGHT
|
|
36 |
+ |
|
37 |
+[StarLite Mk II - AMI firmware]
|
|
38 |
+MatchName=ALPS0001:00 0911:5288 Touchpad
|
|
39 |
+MatchUdevType=touchpad
|
|
40 |
+MatchDMIModalias=dmi:*svnStarLabs:pnLite*
|
|
41 |
+AttrEventCodeDisable=BTN_RIGHT
|
1 |
+[GPD Win Max - All versions]
|
|
2 |
+MatchName=HTIX5288:00 093A:0255 Touchpad
|
|
3 |
+MatchUdevType=touchpad
|
|
4 |
+MatchDMIModalias=dmi:*svnGPD:*pnG1619-*
|
|
5 |
+AttrEventCodeDisable=BTN_RIGHT
|
... | ... | @@ -3,5 +3,5 @@ |
3 | 3 |
[Librem 14v1 Touchpad]
|
4 | 4 |
MatchName=HTIX5288:00 0911:5288 Touchpad
|
5 | 5 |
MatchUdevType=touchpad
|
6 |
-MatchDMIModalias=dmi:*svnPurism:*pnLibrem14*
|
|
6 |
+MatchDMIModalias=dmi:*svnPurism:*pn[Ll]ibrem*14:*
|
|
7 | 7 |
AttrEventCodeDisable=BTN_RIGHT
|
... | ... | @@ -1256,12 +1256,12 @@ tp_gesture_post_gesture(struct tp_dispatch *tp, uint64_t time, |
1256 | 1256 |
if (tp->gesture.state == GESTURE_STATE_HOLD)
|
1257 | 1257 |
tp_gesture_handle_state_hold(tp, time, ignore_motion);
|
1258 | 1258 |
|
1259 |
- if (tp->gesture.state == GESTURE_STATE_HOLD_AND_MOTION)
|
|
1260 |
- tp_gesture_handle_state_hold_and_pointer_motion(tp, time);
|
|
1261 |
- |
|
1262 | 1259 |
if (tp->gesture.state == GESTURE_STATE_POINTER_MOTION)
|
1263 | 1260 |
tp_gesture_handle_state_pointer_motion(tp, time);
|
1264 | 1261 |
|
1262 |
+ if (tp->gesture.state == GESTURE_STATE_HOLD_AND_MOTION)
|
|
1263 |
+ tp_gesture_handle_state_hold_and_pointer_motion(tp, time);
|
|
1264 |
+ |
|
1265 | 1265 |
if (tp->gesture.state == GESTURE_STATE_SCROLL)
|
1266 | 1266 |
tp_gesture_handle_state_scroll(tp, time);
|
1267 | 1267 |
|
... | ... | @@ -230,26 +230,35 @@ evdev_button_scroll_button(struct evdev_device *device, |
230 | 230 |
}
|
231 | 231 |
|
232 | 232 |
if (is_press) {
|
233 |
- enum timer_flags flags = TIMER_FLAG_NONE;
|
|
234 |
- |
|
235 |
- device->scroll.button_scroll_state = BUTTONSCROLL_BUTTON_DOWN;
|
|
233 |
+ if (device->scroll.button < BTN_MOUSE + 5) {
|
|
234 |
+ /* For mouse buttons 1-5 (0x110 to 0x114) we apply a timeout before scrolling
|
|
235 |
+ * since the button could also be used for regular clicking. */
|
|
236 |
+ enum timer_flags flags = TIMER_FLAG_NONE;
|
|
237 |
+ |
|
238 |
+ device->scroll.button_scroll_state = BUTTONSCROLL_BUTTON_DOWN;
|
|
239 |
+ |
|
240 |
+ /* Special case: if middle button emulation is enabled and
|
|
241 |
+ * our scroll button is the left or right button, we only
|
|
242 |
+ * get here *after* the middle button timeout has expired
|
|
243 |
+ * for that button press. The time passed is the button-down
|
|
244 |
+ * time though (which is in the past), so we have to allow
|
|
245 |
+ * for a negative timer to be set.
|
|
246 |
+ */
|
|
247 |
+ if (device->middlebutton.enabled &&
|
|
248 |
+ (device->scroll.button == BTN_LEFT ||
|
|
249 |
+ device->scroll.button == BTN_RIGHT)) {
|
|
250 |
+ flags = TIMER_FLAG_ALLOW_NEGATIVE;
|
|
251 |
+ }
|
|
236 | 252 |
|
237 |
- /* Special case: if middle button emulation is enabled and
|
|
238 |
- * our scroll button is the left or right button, we only
|
|
239 |
- * get here *after* the middle button timeout has expired
|
|
240 |
- * for that button press. The time passed is the button-down
|
|
241 |
- * time though (which is in the past), so we have to allow
|
|
242 |
- * for a negative timer to be set.
|
|
243 |
- */
|
|
244 |
- if (device->middlebutton.enabled &&
|
|
245 |
- (device->scroll.button == BTN_LEFT ||
|
|
246 |
- device->scroll.button == BTN_RIGHT)) {
|
|
247 |
- flags = TIMER_FLAG_ALLOW_NEGATIVE;
|
|
253 |
+ libinput_timer_set_flags(&device->scroll.timer,
|
|
254 |
+ time + DEFAULT_BUTTON_SCROLL_TIMEOUT,
|
|
255 |
+ flags);
|
|
256 |
+ } else {
|
|
257 |
+ /* For extra mouse buttons numbered 6 or more (0x115+) we assume it is
|
|
258 |
+ * dedicated exclusively to scrolling, so we don't apply the timeout
|
|
259 |
+ * in order to provide immediate scrolling responsiveness. */
|
|
260 |
+ device->scroll.button_scroll_state = BUTTONSCROLL_READY;
|
|
248 | 261 |
}
|
249 |
- |
|
250 |
- libinput_timer_set_flags(&device->scroll.timer,
|
|
251 |
- time + DEFAULT_BUTTON_SCROLL_TIMEOUT,
|
|
252 |
- flags);
|
|
253 | 262 |
device->scroll.button_down_time = time;
|
254 | 263 |
evdev_log_debug(device, "btnscroll: down\n");
|
255 | 264 |
} else {
|
... | ... | @@ -47,17 +47,34 @@ simple_log_handler(struct libinput *libinput, |
47 | 47 |
litest_assert_notnull(format);
|
48 | 48 |
}
|
49 | 49 |
|
50 |
+ |
|
51 |
+static int open_restricted(const char *path, int flags, void *data)
|
|
52 |
+{
|
|
53 |
+ int fd;
|
|
54 |
+ fd = open(path, flags);
|
|
55 |
+ return fd < 0 ? -errno : fd;
|
|
56 |
+}
|
|
57 |
+static void close_restricted(int fd, void *data)
|
|
58 |
+{
|
|
59 |
+ close(fd);
|
|
60 |
+}
|
|
61 |
+ |
|
62 |
+static const struct libinput_interface simple_interface = {
|
|
63 |
+ .open_restricted = open_restricted,
|
|
64 |
+ .close_restricted = close_restricted,
|
|
65 |
+};
|
|
66 |
+ |
|
50 | 67 |
START_TEST(log_default_priority)
|
51 | 68 |
{
|
52 | 69 |
enum libinput_log_priority pri;
|
53 | 70 |
struct libinput *li;
|
54 | 71 |
|
55 |
- li = litest_create_context();
|
|
72 |
+ li = libinput_path_create_context(&simple_interface, NULL);
|
|
56 | 73 |
pri = libinput_log_get_priority(li);
|
57 | 74 |
|
58 | 75 |
ck_assert_int_eq(pri, LIBINPUT_LOG_PRIORITY_ERROR);
|
59 | 76 |
|
60 |
- litest_destroy_context(li);
|
|
77 |
+ libinput_unref(li);
|
|
61 | 78 |
}
|
62 | 79 |
END_TEST
|
63 | 80 |
|