tablet: return the wanted eraser button mode/button from the config

This matches our behavior for other settings - always return the
user-configured setting from the configuration API, not the current
setting (which may be delayed until the device is in a netural state).

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1370>
This commit is contained in:
Peter Hutterer 2025-11-26 10:32:18 +10:00
parent 11b97edcdc
commit a6ad084280

View file

@ -1296,7 +1296,7 @@ eraser_button_set_mode(struct libinput_tablet_tool *tool,
static enum libinput_config_eraser_button_mode static enum libinput_config_eraser_button_mode
eraser_button_get_mode(struct libinput_tablet_tool *tool) eraser_button_get_mode(struct libinput_tablet_tool *tool)
{ {
return tool->eraser_button.mode; return tool->eraser_button.want_mode;
} }
static enum libinput_config_eraser_button_mode static enum libinput_config_eraser_button_mode
@ -1330,7 +1330,7 @@ eraser_button_set_button(struct libinput_tablet_tool *tool, uint32_t button)
static unsigned int static unsigned int
eraser_button_get_button(struct libinput_tablet_tool *tool) eraser_button_get_button(struct libinput_tablet_tool *tool)
{ {
return tool->eraser_button.button; return tool->eraser_button.want_button;
} }
static unsigned int static unsigned int