diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/libinput/tablet_tool.c | 17 | ||||
-rw-r--r-- | backend/wayland/tablet_v2.c | 24 |
2 files changed, 20 insertions, 21 deletions
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index 0aa960ab..31cd18b8 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -130,9 +130,8 @@ void handle_tablet_tool_axis(struct libinput_event *event, struct tablet_tool *tool = get_tablet_tool(dev, libinput_event_tablet_tool_get_tool(tevent)); - struct wlr_event_tablet_tool_axis wlr_event = { 0 }; - - wlr_event.device = &wlr_tablet->base; + struct wlr_tablet_tool_axis_event wlr_event = { 0 }; + wlr_event.tablet = wlr_tablet; wlr_event.tool = &tool->wlr_tool; wlr_event.time_msec = usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent)); @@ -185,9 +184,9 @@ void handle_tablet_tool_proximity(struct libinput_event *event, struct tablet_tool *tool = get_tablet_tool(dev, libinput_event_tablet_tool_get_tool(tevent)); - struct wlr_event_tablet_tool_proximity wlr_event = { 0 }; + struct wlr_tablet_tool_proximity_event wlr_event = { 0 }; + wlr_event.tablet = wlr_tablet; wlr_event.tool = &tool->wlr_tool; - wlr_event.device = &wlr_tablet->base; wlr_event.time_msec = usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent)); wlr_event.x = libinput_event_tablet_tool_get_x_transformed(tevent, 1); @@ -227,8 +226,8 @@ void handle_tablet_tool_tip(struct libinput_event *event, struct tablet_tool *tool = get_tablet_tool(dev, libinput_event_tablet_tool_get_tool(tevent)); - struct wlr_event_tablet_tool_tip wlr_event = { 0 }; - wlr_event.device = &wlr_tablet->base; + struct wlr_tablet_tool_tip_event wlr_event = { 0 }; + wlr_event.tablet = wlr_tablet; wlr_event.tool = &tool->wlr_tool; wlr_event.time_msec = usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent)); @@ -255,8 +254,8 @@ void handle_tablet_tool_button(struct libinput_event *event, struct tablet_tool *tool = get_tablet_tool(dev, libinput_event_tablet_tool_get_tool(tevent)); - struct wlr_event_tablet_tool_button wlr_event = { 0 }; - wlr_event.device = &wlr_tablet->base; + struct wlr_tablet_tool_button_event wlr_event = { 0 }; + wlr_event.tablet = wlr_tablet; wlr_event.tool = &tool->wlr_tool; wlr_event.time_msec = usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent)); diff --git a/backend/wayland/tablet_v2.c b/backend/wayland/tablet_v2.c index 04ce2377..bedaabf2 100644 --- a/backend/wayland/tablet_v2.c +++ b/backend/wayland/tablet_v2.c @@ -582,8 +582,8 @@ static void handle_tablet_tool_button(void *data, struct wlr_wl_seat *seat = tool->seat; struct wlr_tablet *tablet = &seat->wlr_tablet; - struct wlr_event_tablet_tool_button evt = { - .device = &tablet->base, + struct wlr_tablet_tool_button_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = get_current_time_msec(), .button = button, @@ -620,8 +620,8 @@ static void handle_tablet_tool_frame(void *data, struct wlr_tablet *tablet = &seat->wlr_tablet; if (tool->is_in) { - struct wlr_event_tablet_tool_proximity evt = { - .device = &tablet->base, + struct wlr_tablet_tool_proximity_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = time, .x = tool->x, @@ -633,8 +633,8 @@ static void handle_tablet_tool_frame(void *data, } { - struct wlr_event_tablet_tool_axis evt = { - .device = &tablet->base, + struct wlr_tablet_tool_axis_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = time, .updated_axes = 0, @@ -696,8 +696,8 @@ static void handle_tablet_tool_frame(void *data, * Downside: Here we have the frame time, if we sent right away, we * need to generate the time */ if (tool->is_down) { - struct wlr_event_tablet_tool_tip evt = { - .device = &tablet->base, + struct wlr_tablet_tool_tip_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = time, .x = tool->x, @@ -709,8 +709,8 @@ static void handle_tablet_tool_frame(void *data, } if (tool->is_up) { - struct wlr_event_tablet_tool_tip evt = { - .device = &tablet->base, + struct wlr_tablet_tool_tip_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = time, .x = tool->x, @@ -722,8 +722,8 @@ static void handle_tablet_tool_frame(void *data, } if (tool->is_out) { - struct wlr_event_tablet_tool_proximity evt = { - .device = &tablet->base, + struct wlr_tablet_tool_proximity_event evt = { + .tablet = tablet, .tool = &seat->wlr_tablet_tool, .time_msec = time, .x = tool->x, |