From e8c407d00e9acaff27973af8df4eaf19b6571d88 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:46:19 -0500 Subject: [PATCH] rename wlr_deco_part to roots_deco_part --- include/rootston/view.h | 16 ++++++++-------- rootston/cursor.c | 16 ++++++++-------- rootston/desktop.c | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/rootston/view.h b/include/rootston/view.h index 77b78852..108a8267 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -135,15 +135,15 @@ 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 roots_deco_part { + ROOTS_DECO_PART_NONE = 0, + ROOTS_DECO_PART_TOP_BORDER = (1 << 0), + ROOTS_DECO_PART_BOTTOM_BORDER = (1 << 1), + ROOTS_DECO_PART_LEFT_BORDER = (1 << 2), + ROOTS_DECO_PART_RIGHT_BORDER = (1 << 3), + ROOTS_DECO_PART_TITLEBAR = (1 << 4), }; -enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); +enum roots_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); #endif diff --git a/rootston/cursor.c b/rootston/cursor.c index 8f6091ee..5430afe5 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -40,17 +40,17 @@ static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, sy = view->grab_sy; } - enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); + enum roots_deco_part parts = view_get_deco_part(view->view, sx, sy); - bool is_titlebar = (parts & WLR_DECO_PART_TITLEBAR); + bool is_titlebar = (parts & ROOTS_DECO_PART_TITLEBAR); uint32_t edges = 0; - if (parts & WLR_DECO_PART_LEFT_BORDER) { + if (parts & ROOTS_DECO_PART_LEFT_BORDER) { edges |= WLR_EDGE_LEFT; - } else if (parts & WLR_DECO_PART_RIGHT_BORDER) { + } else if (parts & ROOTS_DECO_PART_RIGHT_BORDER) { edges |= WLR_EDGE_RIGHT; - } else if (parts & WLR_DECO_PART_BOTTOM_BORDER) { + } else if (parts & ROOTS_DECO_PART_BOTTOM_BORDER) { edges |= WLR_EDGE_BOTTOM; - } else if (parts & WLR_DECO_PART_TOP_BORDER) { + } else if (parts & ROOTS_DECO_PART_TOP_BORDER) { edges |= WLR_EDGE_TOP; } @@ -90,8 +90,8 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx, view->has_button_grab = false; } - enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); - if (state == WLR_BUTTON_RELEASED && (parts & WLR_DECO_PART_TITLEBAR)) { + enum roots_deco_part parts = view_get_deco_part(view->view, sx, sy); + if (state == WLR_BUTTON_RELEASED && (parts & ROOTS_DECO_PART_TITLEBAR)) { struct roots_cursor *cursor = view->seat->cursor; wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, cursor->default_xcursor, cursor->cursor); diff --git a/rootston/desktop.c b/rootston/desktop.c index 2632eebd..5fa27db2 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -44,9 +44,9 @@ void view_get_deco_box(const struct roots_view *view, struct wlr_box *box) { box->height += (view->border_width * 2 + view->titlebar_height); } -enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy) { +enum roots_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy) { if (!view->decorated) { - return WLR_DECO_PART_NONE; + return ROOTS_DECO_PART_NONE; } int sw = view->wlr_surface->current->width; @@ -55,24 +55,24 @@ enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double int titlebar_h = view->titlebar_height; if (sx > 0 && sx < sw && sy < 0 && sy > -view->titlebar_height) { - return WLR_DECO_PART_TITLEBAR; + return ROOTS_DECO_PART_TITLEBAR; } - enum wlr_deco_part parts = 0; + enum roots_deco_part parts = 0; if (sy >= -(titlebar_h + bw) && sy <= sh + bw) { if (sx < 0 && sx > -bw) { - parts |= WLR_DECO_PART_LEFT_BORDER; + parts |= ROOTS_DECO_PART_LEFT_BORDER; } else if (sx > sw && sx < sw + bw) { - parts |= WLR_DECO_PART_RIGHT_BORDER; + parts |= ROOTS_DECO_PART_RIGHT_BORDER; } } if (sx >= -bw && sx <= sw + bw) { if (sy > sh && sy <= sh + bw) { - parts |= WLR_DECO_PART_BOTTOM_BORDER; + parts |= ROOTS_DECO_PART_BOTTOM_BORDER; } else if (sy >= -(titlebar_h + bw) && sy < 0) { - parts |= WLR_DECO_PART_TOP_BORDER; + parts |= ROOTS_DECO_PART_TOP_BORDER; } }