From 41832714758c003c557da30193c6b02a2afe54b2 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:24:53 -0500 Subject: make it work with rotation --- include/rootston/seat.h | 4 ++-- include/rootston/view.h | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/rootston/seat.h b/include/rootston/seat.h index 6ae7c3fa..966d98e5 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -30,8 +30,8 @@ struct roots_seat_view { struct roots_view *view; bool has_button_grab; - double grab_vx; - double grab_vy; + double grab_sx; + double grab_sy; struct wl_list link; // roots_seat::views diff --git a/include/rootston/view.h b/include/rootston/view.h index 68ccbef8..77b78852 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -120,7 +120,6 @@ struct roots_view { }; void view_get_box(const struct roots_view *view, struct wlr_box *box); -void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); void view_activate(struct roots_view *view, bool active); void view_move(struct roots_view *view, double x, double y); void view_resize(struct roots_view *view, uint32_t width, uint32_t height); @@ -134,4 +133,17 @@ bool view_center(struct roots_view *view); void view_setup(struct roots_view *view); void view_teardown(struct roots_view *view); +void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); + +enum wlr_deco_part { + WLR_DECO_PART_NONE = 0, + WLR_DECO_PART_TOP_BORDER = (1 << 0), + WLR_DECO_PART_BOTTOM_BORDER = (1 << 1), + WLR_DECO_PART_LEFT_BORDER = (1 << 2), + WLR_DECO_PART_RIGHT_BORDER = (1 << 3), + WLR_DECO_PART_TITLEBAR = (1 << 4), +}; + +enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); + #endif -- cgit v1.2.3