mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-21 11:10:41 +02:00
tablet: move the quirk disabling up within tablet_init
Let's make sure all libevdev manipluations are done before we start initializing anything based on the event codes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
134893790e
commit
c897b1e2f8
1 changed files with 6 additions and 6 deletions
|
|
@ -2022,6 +2022,12 @@ tablet_init(struct tablet_dispatch *tablet,
|
|||
if (tablet_reject_device(device))
|
||||
return -1;
|
||||
|
||||
if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN)) {
|
||||
libevdev_enable_event_code(evdev, EV_KEY, BTN_TOOL_PEN, NULL);
|
||||
want_proximity_quirk = true;
|
||||
tablet->quirks.proximity_out_forced = true;
|
||||
}
|
||||
|
||||
tablet_init_calibration(tablet, device);
|
||||
tablet_init_proximity_threshold(tablet, device);
|
||||
rc = tablet_init_accel(tablet, device);
|
||||
|
|
@ -2039,12 +2045,6 @@ tablet_init(struct tablet_dispatch *tablet,
|
|||
|
||||
tablet_set_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY);
|
||||
|
||||
if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN)) {
|
||||
libevdev_enable_event_code(evdev, EV_KEY, BTN_TOOL_PEN, NULL);
|
||||
want_proximity_quirk = true;
|
||||
tablet->quirks.proximity_out_forced = true;
|
||||
}
|
||||
|
||||
if (device->model_flags & EVDEV_MODEL_TABLET_NO_PROXIMITY_OUT)
|
||||
want_proximity_quirk = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue