|
@@ -1336,18 +1336,28 @@ static void pointer_handle_axis_value120(void *data, struct wl_pointer *pointer,
|
|
|
pointer_handle_axis_common(seat, SDL_WAYLAND_AXIS_EVENT_VALUE120, axis, wl_fixed_from_int(value120));
|
|
pointer_handle_axis_common(seat, SDL_WAYLAND_AXIS_EVENT_VALUE120, axis, wl_fixed_from_int(value120));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static void pointer_handle_warp(void *data, struct wl_pointer *wl_pointer, wl_fixed_t surface_x, wl_fixed_t surface_y)
|
|
|
|
|
+{
|
|
|
|
|
+ SDL_WaylandSeat *seat = (SDL_WaylandSeat *)data;
|
|
|
|
|
+
|
|
|
|
|
+ seat->pointer.pending_frame.have_absolute = true;
|
|
|
|
|
+ seat->pointer.pending_frame.absolute.sx = surface_x;
|
|
|
|
|
+ seat->pointer.pending_frame.absolute.sy = surface_y;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
static const struct wl_pointer_listener pointer_listener = {
|
|
static const struct wl_pointer_listener pointer_listener = {
|
|
|
pointer_handle_enter,
|
|
pointer_handle_enter,
|
|
|
pointer_handle_leave,
|
|
pointer_handle_leave,
|
|
|
pointer_handle_motion,
|
|
pointer_handle_motion,
|
|
|
pointer_handle_button,
|
|
pointer_handle_button,
|
|
|
pointer_handle_axis,
|
|
pointer_handle_axis,
|
|
|
- pointer_handle_frame, // Version 5
|
|
|
|
|
- pointer_handle_axis_source, // Version 5
|
|
|
|
|
- pointer_handle_axis_stop, // Version 5
|
|
|
|
|
- pointer_handle_axis_discrete, // Version 5
|
|
|
|
|
- pointer_handle_axis_value120, // Version 8
|
|
|
|
|
- pointer_handle_axis_relative_direction // Version 9
|
|
|
|
|
|
|
+ pointer_handle_frame, // Version 5
|
|
|
|
|
+ pointer_handle_axis_source, // Version 5
|
|
|
|
|
+ pointer_handle_axis_stop, // Version 5
|
|
|
|
|
+ pointer_handle_axis_discrete, // Version 5
|
|
|
|
|
+ pointer_handle_axis_value120, // Version 8
|
|
|
|
|
+ pointer_handle_axis_relative_direction, // Version 9
|
|
|
|
|
+ pointer_handle_warp // Version 11
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
static void relative_pointer_handle_relative_motion(void *data,
|
|
static void relative_pointer_handle_relative_motion(void *data,
|