aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-01 01:03:41 +0100
committerGitHub <noreply@github.com>2018-11-01 01:03:41 +0100
commit480b03b734e6d1d068859b254d8ace4fb07b2c54 (patch)
tree131faacd2b7c36e37444441cb0fd719c00818486 /sway/input
parent35fda6765b154c1824b3e347579b9d41b309212c (diff)
parent528c7495bb09e18a8b63e1c741b90f65ff5541c6 (diff)
Merge pull request #3040 from RyanDwyer/border-props-to-container
Move view border properties to container struct
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c13
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;
}