mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 23:20:29 +01:00
tablet: skip tablet_flush() if our current tool type is none
If a tablet never sends a BTN_TOOL_foo, we never update the tool and we remain on the 'none' tool. Somewhat related to: https://bugzilla.redhat.com/show_bug.cgi?id=1535755 https://bugs.freedesktop.org/show_bug.cgi?id=104911 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
44426b460c
commit
26705762e2
1 changed files with 9 additions and 5 deletions
|
|
@ -1556,11 +1556,15 @@ tablet_flush(struct tablet_dispatch *tablet,
|
|||
struct evdev_device *device,
|
||||
uint64_t time)
|
||||
{
|
||||
struct libinput_tablet_tool *tool =
|
||||
tablet_get_tool(tablet,
|
||||
tablet->current_tool_type,
|
||||
tablet->current_tool_id,
|
||||
tablet->current_tool_serial);
|
||||
struct libinput_tablet_tool *tool;
|
||||
|
||||
if (tablet->current_tool_type == LIBINPUT_TOOL_NONE)
|
||||
return;
|
||||
|
||||
tool = tablet_get_tool(tablet,
|
||||
tablet->current_tool_type,
|
||||
tablet->current_tool_id,
|
||||
tablet->current_tool_serial);
|
||||
|
||||
if (!tool)
|
||||
return; /* OOM */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue