mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Remove width_mm from tablet events
This commit is contained in:
parent
324b9d910d
commit
ac219cbda6
7 changed files with 36 additions and 24 deletions
|
|
@ -46,6 +46,8 @@ static struct wlr_input_device *allocate_device(
|
|||
return NULL;
|
||||
}
|
||||
struct wlr_input_device *wlr_dev = &wlr_libinput_dev->wlr_input_device;
|
||||
libinput_device_get_size(libinput_dev,
|
||||
&wlr_dev->width_mm, &wlr_dev->height_mm);
|
||||
wl_list_insert(wlr_devices, &wlr_dev->link);
|
||||
wlr_libinput_dev->handle = libinput_dev;
|
||||
libinput_device_ref(libinput_dev);
|
||||
|
|
|
|||
|
|
@ -34,14 +34,13 @@ void handle_tablet_tool_axis(struct libinput_event *event,
|
|||
wlr_event.device = wlr_dev;
|
||||
wlr_event.time_msec =
|
||||
usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent));
|
||||
libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm);
|
||||
if (libinput_event_tablet_tool_x_has_changed(tevent)) {
|
||||
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_X;
|
||||
wlr_event.x_mm = libinput_event_tablet_tool_get_x(tevent);
|
||||
wlr_event.x = libinput_event_tablet_tool_get_x_transformed(tevent, 1);
|
||||
}
|
||||
if (libinput_event_tablet_tool_y_has_changed(tevent)) {
|
||||
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_Y;
|
||||
wlr_event.y_mm = libinput_event_tablet_tool_get_y(tevent);
|
||||
wlr_event.y = libinput_event_tablet_tool_get_y_transformed(tevent, 1);
|
||||
}
|
||||
if (libinput_event_tablet_tool_pressure_has_changed(tevent)) {
|
||||
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_PRESSURE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue