From c640c3015f3a7ea2987bd7854d13ff282f90804f Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Tue, 21 Nov 2023 19:55:47 -0500 Subject: scene_graph: Port seat drag icons --- include/sway/input/seat.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'include/sway/input') diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 28a3ea37..3c81a713 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -75,20 +76,6 @@ struct sway_seat_node { struct wl_listener destroy; }; -struct sway_drag_icon { - struct sway_seat *seat; - struct wlr_drag_icon *wlr_drag_icon; - struct wl_list link; // sway_root::drag_icons - - double x, y; // in layout-local coordinates - int dx, dy; // offset in surface-local coordinates - - struct wl_listener surface_commit; - struct wl_listener map; - struct wl_listener unmap; - struct wl_listener destroy; -}; - struct sway_drag { struct sway_seat *seat; struct wlr_drag *wlr_drag; @@ -99,6 +86,15 @@ struct sway_seat { struct wlr_seat *wlr_seat; struct sway_cursor *cursor; + // Seat scene tree structure + // - scene_tree + // - drag icons + // - drag icon 1 + // - drag icon 2 + // - seatop specific stuff + struct wlr_scene_tree *scene_tree; + struct wlr_scene_tree *drag_icons; + bool has_focus; struct wl_list focus_stack; // list of containers in focus order struct sway_workspace *workspace; @@ -257,7 +253,7 @@ void seat_idle_notify_activity(struct sway_seat *seat, bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); -void drag_icon_update_position(struct sway_drag_icon *icon); +void drag_icons_update_position(struct sway_seat *seat); enum wlr_edges find_resize_edge(struct sway_container *cont, struct wlr_surface *surface, struct sway_cursor *cursor); -- cgit v1.2.3