diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-31 20:28:36 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-31 23:56:20 +1000 |
commit | 528c7495bb09e18a8b63e1c741b90f65ff5541c6 (patch) | |
tree | b1dddeefb15f2511b33f7bed52d0df3b4110d8f8 /sway/input | |
parent | e21a23348bd097d0b1d247a05324a8af92300851 (diff) | |
download | sway-528c7495bb09e18a8b63e1c741b90f65ff5541c6.tar.xz |
Move view border properties to container struct
This will be needed to implement layout saving and restoring, as we need
to be able to configure borders on a placeholder container which has no
view.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 7ede48bf..c539df40 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -187,23 +187,22 @@ static enum wlr_edges find_edge(struct sway_container *cont, if (!cont->view) { return WLR_EDGE_NONE; } - struct sway_view *view = cont->view; - if (view->border == B_NONE || !view->border_thickness || - view->border == B_CSD) { + if (cont->border == B_NONE || !cont->border_thickness || + cont->border == B_CSD) { return WLR_EDGE_NONE; } enum wlr_edges edge = 0; - if (cursor->cursor->x < cont->x + view->border_thickness) { + if (cursor->cursor->x < cont->x + cont->border_thickness) { edge |= WLR_EDGE_LEFT; } - if (cursor->cursor->y < cont->y + view->border_thickness) { + if (cursor->cursor->y < cont->y + cont->border_thickness) { edge |= WLR_EDGE_TOP; } - if (cursor->cursor->x >= cont->x + cont->width - view->border_thickness) { + if (cursor->cursor->x >= cont->x + cont->width - cont->border_thickness) { edge |= WLR_EDGE_RIGHT; } - if (cursor->cursor->y >= cont->y + cont->height - view->border_thickness) { + if (cursor->cursor->y >= cont->y + cont->height - cont->border_thickness) { edge |= WLR_EDGE_BOTTOM; } |