mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 21:00:06 +01:00
tablet: simplify check for testing if an axis update is needed
We know when one of the bits is set we need to send an event Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
c8a99cdf10
commit
67220c643f
1 changed files with 1 additions and 5 deletions
|
|
@ -291,7 +291,6 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
|
|||
struct libinput_tablet_tool *tool)
|
||||
{
|
||||
struct libinput_device *base = &device->base;
|
||||
bool axis_update_needed = false;
|
||||
int a;
|
||||
double axes[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1] = {0};
|
||||
double wheel_delta = 0;
|
||||
|
|
@ -300,10 +299,7 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
|
|||
const struct input_absinfo *absinfo;
|
||||
const char tmp[sizeof(tablet->changed_axes)] = {0};
|
||||
|
||||
if (memcmp(tmp, tablet->changed_axes, sizeof(tmp)))
|
||||
axis_update_needed = true;
|
||||
|
||||
if (!axis_update_needed)
|
||||
if (memcmp(tmp, tablet->changed_axes, sizeof(tmp)) == 0)
|
||||
return;
|
||||
|
||||
/* x/y are special for left-handed and calibration */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue