diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev-lid.c | 10 | ||||
-rw-r--r-- | src/evdev-mt-touchpad-gestures.c | 5 | ||||
-rw-r--r-- | src/evdev-mt-touchpad.c | 12 | ||||
-rw-r--r-- | src/evdev.c | 1 | ||||
-rw-r--r-- | src/evdev.h | 1 | ||||
-rw-r--r-- | src/libinput.h | 2 |
6 files changed, 11 insertions, 20 deletions
diff --git a/src/evdev-lid.c b/src/evdev-lid.c index 8db7f37..a975e35 100644 --- a/src/evdev-lid.c +++ b/src/evdev-lid.c @@ -92,13 +92,13 @@ lid_switch_toggle_keyboard_listener(struct lid_switch_dispatch *dispatch, if (is_closed) { libinput_device_add_event_listener( - &dispatch->keyboard.keyboard->base, - &dispatch->keyboard.listener, - lid_switch_keyboard_event, - dispatch); + &dispatch->keyboard.keyboard->base, + &dispatch->keyboard.listener, + lid_switch_keyboard_event, + dispatch); } else { libinput_device_remove_event_listener( - &dispatch->keyboard.listener); + &dispatch->keyboard.listener); } } diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 3de6bcd..a20b26d 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -153,13 +153,12 @@ tp_gesture_get_active_touches(const struct tp_dispatch *tp, struct tp_touch **touches, unsigned int count) { - unsigned int i, n = 0; + unsigned int n = 0; struct tp_touch *t; memset(touches, 0, count * sizeof(struct tp_touch *)); - for (i = 0; i < tp->ntouches; i++) { - t = &tp->touches[i]; + tp_for_each_touch(tp, t) { if (tp_touch_active(tp, t)) { touches[n++] = t; if (n == count) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index a2cdf43..8140c44 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -920,8 +920,7 @@ tp_unhover_pressure(struct tp_dispatch *tp, uint64_t time) * _all_ fingers have enough pressure, even if some of the slotted * ones don't. Anything else gets insane quickly. */ - for (i = 0; i < (int)tp->ntouches; i++) { - t = tp_get_touch(tp, i); + tp_for_each_touch(tp, t) { if (t->state == TOUCH_HOVERING) { /* avoid jumps when landing a finger */ tp_motion_history_reset(t); @@ -975,9 +974,7 @@ tp_unhover_fake_touches(struct tp_dispatch *tp, uint64_t time) */ if (tp_fake_finger_is_touching(tp) && tp->nfingers_down < nfake_touches) { - for (i = 0; i < (int)tp->ntouches; i++) { - t = tp_get_touch(tp, i); - + tp_for_each_touch(tp, t) { if (t->state == TOUCH_HOVERING) { tp_begin_touch(tp, t, time); @@ -1135,7 +1132,6 @@ static void tp_process_state(struct tp_dispatch *tp, uint64_t time) { struct tp_touch *t; - unsigned int i; bool restart_filter = false; bool want_motion_reset; @@ -1145,9 +1141,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time) want_motion_reset = tp_need_motion_history_reset(tp); - for (i = 0; i < tp->ntouches; i++) { - t = tp_get_touch(tp, i); - + tp_for_each_touch(tp, t) { if (want_motion_reset) { tp_motion_history_reset(t); t->quirks.reset_motion_history = true; diff --git a/src/evdev.c b/src/evdev.c index 7fd8478..d24a564 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2254,7 +2254,6 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(ALPS_TOUCHPAD), MODEL(SYNAPTICS_SERIAL_TOUCHPAD), MODEL(JUMPING_SEMI_MT), - MODEL(ELANTECH_TOUCHPAD), MODEL(APPLE_INTERNAL_KEYBOARD), MODEL(CYBORG_RAT), MODEL(CYAPA), diff --git a/src/evdev.h b/src/evdev.h index 465b8a3..c9a44f8 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -111,7 +111,6 @@ enum evdev_device_model { EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), EVDEV_MODEL_CYBORG_RAT = (1 << 14), diff --git a/src/libinput.h b/src/libinput.h index 54bbc7f..6b63d47 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -2763,7 +2763,7 @@ struct libinput_tablet_pad_mode_group * libinput_event_tablet_pad_get_mode_group(struct libinput_event_tablet_pad *event); /** - * @ingroup event_tablet + * @ingroup event_tablet_pad * * @note Timestamps may not always increase. See @ref event_timestamps for * details. |