mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-04 23:40:14 +01:00
touchpad: enable middle button emulation on some touchpads
If the touchpad has left/right physical buttons but no middle button, force middle button emulation - without a config option, it's always on. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
1ba7004dbc
commit
e6d503a72c
1 changed files with 4 additions and 0 deletions
|
|
@ -694,6 +694,10 @@ tp_init_buttons(struct tp_dispatch *tp,
|
|||
|
||||
tp_init_top_softbuttons(tp, device, 1.0);
|
||||
|
||||
if (!tp->buttons.is_clickpad &&
|
||||
!libevdev_has_event_code(device->evdev, EV_KEY, BTN_MIDDLE))
|
||||
evdev_init_middlebutton(tp->device, true, false);
|
||||
|
||||
tp_for_each_touch(tp, t) {
|
||||
t->button.state = BUTTON_STATE_NONE;
|
||||
libinput_timer_init(&t->button.timer,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue