mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 14:48:09 +02:00
tablet: enable tablet change button scroll method
This commit is contained in:
parent
9901534506
commit
e335f43971
1 changed files with 24 additions and 0 deletions
|
|
@ -2734,6 +2734,27 @@ tablet_fix_tilt(struct tablet_dispatch *tablet,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
tablet_change_scroll_method(struct evdev_device *device)
|
||||
{
|
||||
// FIXME
|
||||
//struct tablet_dispatch *dispatch = tablet_dispatch(device->dispatch);
|
||||
|
||||
if (device->scroll.want_method == device->scroll.method &&
|
||||
device->scroll.want_button == device->scroll.button &&
|
||||
device->scroll.want_lock_enabled == device->scroll.lock_enabled)
|
||||
return;
|
||||
|
||||
// FIXME
|
||||
//if (tablet_any_button_down(dispatch, device))
|
||||
// return;
|
||||
|
||||
device->scroll.method = device->scroll.want_method;
|
||||
device->scroll.button = device->scroll.want_button;
|
||||
device->scroll.lock_enabled = device->scroll.want_lock_enabled;
|
||||
evdev_set_button_scroll_lock_enabled(device, device->scroll.lock_enabled);
|
||||
}
|
||||
|
||||
static int
|
||||
tablet_init(struct tablet_dispatch *tablet,
|
||||
struct evdev_device *device)
|
||||
|
|
@ -2747,6 +2768,9 @@ tablet_init(struct tablet_dispatch *tablet,
|
|||
tablet->device = device;
|
||||
tablet->status = TABLET_NONE;
|
||||
tablet->current_tool.type = LIBINPUT_TOOL_NONE;
|
||||
|
||||
evdev_init_button_scroll(device, tablet_change_scroll_method);
|
||||
|
||||
list_init(&tablet->tool_list);
|
||||
|
||||
if (tablet_reject_device(device))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue