From: Peter Hutterer Date: Wed, 14 Jun 2023 00:59:02 +0000 (+1000) Subject: tablet: split proximity and axis update handling X-Git-Tag: accepted/tizen/unified/20240105.013022~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=634d6bcf378d9f50bf225463d5f6061aa907debd;p=platform%2Fupstream%2Flibinput.git tablet: split proximity and axis update handling Let's make this two conditions, this is too confusing to read otherwise. Signed-off-by: Peter Hutterer --- diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 61d99ffc..9cdb5896 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1948,16 +1948,14 @@ reprocess: tablet_set_status(tablet, TABLET_BUTTONS_RELEASED); if (tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT)) tablet_set_status(tablet, TABLET_TOOL_LEAVING_CONTACT); - } else if (tablet_has_status(tablet, TABLET_AXES_UPDATED) || - tablet_has_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY)) { - if (tablet_has_status(tablet, - TABLET_TOOL_ENTERING_PROXIMITY)) { - tablet_mark_all_axes_changed(tablet, tool); - update_pressure_offset(tablet, device, tool); - detect_pressure_offset(tablet, device, tool); - } else { - update_pressure_offset(tablet, device, tool); - } + } else if (tablet_has_status(tablet, TABLET_TOOL_ENTERING_PROXIMITY)) { + tablet_mark_all_axes_changed(tablet, tool); + update_pressure_offset(tablet, device, tool); + detect_pressure_offset(tablet, device, tool); + detect_tool_contact(tablet, device, tool); + sanitize_tablet_axes(tablet, tool); + } else if (tablet_has_status(tablet, TABLET_AXES_UPDATED)) { + update_pressure_offset(tablet, device, tool); detect_tool_contact(tablet, device, tool); sanitize_tablet_axes(tablet, tool); }