From 0dc1863dce163622371dc3ffb2c6073cbda17075 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sat, 25 Apr 2020 15:07:17 -0400 Subject: input/cursor: make cursor rebasing cursor type-agnostic This commit refactors `cursor_rebase` into `cursor_update_image`, and moves sending pointer events to the two existing call sites. This will enable this code to be reused for tablets. Refs #5232 --- include/sway/input/cursor.h | 1 + include/sway/input/seat.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include/sway') diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 3f46c548..1b31143d 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -85,6 +85,7 @@ struct sway_cursor *sway_cursor_create(struct sway_seat *seat); */ void cursor_rebase(struct sway_cursor *cursor); void cursor_rebase_all(void); +void cursor_update_image(struct sway_cursor *cursor, struct sway_node *node); void cursor_handle_activity(struct sway_cursor *cursor, enum sway_input_idle_source idle_source); diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 6d7495dd..ad7cac75 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -220,6 +220,9 @@ bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); void drag_icon_update_position(struct sway_drag_icon *icon); +enum wlr_edges find_resize_edge(struct sway_container *cont, + struct wlr_surface *surface, struct sway_cursor *cursor); + void seatop_begin_default(struct sway_seat *seat); void seatop_begin_down(struct sway_seat *seat, struct sway_container *con, -- cgit v1.2.3-54-g00ecf