mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 09:10:04 +01:00
plugin: remove the event frame callbacks when disabling a plugin
In all cases we remove the device's handling from the plugin so let's remove the event frame callback for this device. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1300>
This commit is contained in:
parent
3ff1a2e24d
commit
b2cd9c69a0
4 changed files with 13 additions and 3 deletions
|
|
@ -205,6 +205,9 @@ debounce_maybe_disable(struct plugin_device *device)
|
|||
"%s: disabled button debouncing on request\n",
|
||||
libinput_device_get_name(device->device));
|
||||
device->state = DEBOUNCE_STATE_DISABLED;
|
||||
libinput_plugin_enable_device_event_frame(device->parent->plugin,
|
||||
device->device,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,12 +149,13 @@ wheel_maybe_disable(struct plugin_device *device)
|
|||
if (device->state != WHEEL_STATE_NONE)
|
||||
return;
|
||||
|
||||
if (device->want_feature_disabled &&
|
||||
device->ignore_small_hi_res_movements != PASSTHROUGH) {
|
||||
if (device->want_feature_disabled) {
|
||||
plugin_log_debug(device->parent->plugin,
|
||||
"%s: disabled wheel debouncing on request\n",
|
||||
libinput_device_get_name(device->device));
|
||||
device->ignore_small_hi_res_movements = PASSTHROUGH;
|
||||
libinput_plugin_enable_device_event_frame(device->parent->plugin,
|
||||
device->device,
|
||||
false);
|
||||
libinput_plugin_timer_cancel(device->scroll_timer);
|
||||
device->scroll_timer =
|
||||
libinput_plugin_timer_unref(device->scroll_timer);
|
||||
|
|
|
|||
|
|
@ -217,6 +217,9 @@ double_tool_plugin_device_handle_frame(struct libinput_plugin *libinput_plugin,
|
|||
libinput_plugin,
|
||||
"device %s: device is fine, unregistering device\n",
|
||||
libinput_device_get_name(device->device));
|
||||
libinput_plugin_enable_device_event_frame(libinput_plugin,
|
||||
device->device,
|
||||
false);
|
||||
plugin_device_destroy(device);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,6 +186,9 @@ proximity_timer_plugin_device_handle_frame(struct libinput_plugin *libinput_plug
|
|||
case EVDEV_BTN_TOOL_FINGER:
|
||||
case EVDEV_BTN_TOOL_MOUSE:
|
||||
case EVDEV_BTN_TOOL_LENS:
|
||||
libinput_plugin_enable_device_event_frame(libinput_plugin,
|
||||
device->device,
|
||||
false);
|
||||
plugin_device_destroy(device);
|
||||
return;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue