xmm, ymm);
}
-static void
-setup_device(struct libinput_device *device)
-{
- if (options.tapping != -1)
- libinput_device_config_tap_set_enabled(device, options.tapping);
-}
-
static int
handle_and_print_events(struct libinput *li)
{
case LIBINPUT_EVENT_DEVICE_ADDED:
case LIBINPUT_EVENT_DEVICE_REMOVED:
print_device_notify(ev);
- setup_device(libinput_event_get_device(ev));
+ tools_device_apply_config(libinput_event_get_device(ev),
+ &options);
break;
case LIBINPUT_EVENT_KEYBOARD_KEY:
print_key_event(ev);
return li;
}
+
+void
+tools_device_apply_config(struct libinput_device *device,
+ struct tools_options *options)
+{
+ if (options->tapping != -1)
+ libinput_device_config_tap_set_enabled(device, options->tapping);
+}
int tools_parse_args(int argc, char **argv, struct tools_options *options);
struct libinput* tools_open_backend(struct tools_options *options,
const struct libinput_interface *interface);
-
+void tools_device_apply_config(struct libinput_device *device,
+ struct tools_options *options);
void tools_usage();
#endif