diff options
Diffstat (limited to 'sway/input/cursor.c')
-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, | |||
187 | if (!cont->view) { | 187 | if (!cont->view) { |
188 | return WLR_EDGE_NONE; | 188 | return WLR_EDGE_NONE; |
189 | } | 189 | } |
190 | struct sway_view *view = cont->view; | 190 | if (cont->border == B_NONE || !cont->border_thickness || |
191 | if (view->border == B_NONE || !view->border_thickness || | 191 | cont->border == B_CSD) { |
192 | view->border == B_CSD) { | ||
193 | return WLR_EDGE_NONE; | 192 | return WLR_EDGE_NONE; |
194 | } | 193 | } |
195 | 194 | ||
196 | enum wlr_edges edge = 0; | 195 | enum wlr_edges edge = 0; |
197 | if (cursor->cursor->x < cont->x + view->border_thickness) { | 196 | if (cursor->cursor->x < cont->x + cont->border_thickness) { |
198 | edge |= WLR_EDGE_LEFT; | 197 | edge |= WLR_EDGE_LEFT; |
199 | } | 198 | } |
200 | if (cursor->cursor->y < cont->y + view->border_thickness) { | 199 | if (cursor->cursor->y < cont->y + cont->border_thickness) { |
201 | edge |= WLR_EDGE_TOP; | 200 | edge |= WLR_EDGE_TOP; |
202 | } | 201 | } |
203 | if (cursor->cursor->x >= cont->x + cont->width - view->border_thickness) { | 202 | if (cursor->cursor->x >= cont->x + cont->width - cont->border_thickness) { |
204 | edge |= WLR_EDGE_RIGHT; | 203 | edge |= WLR_EDGE_RIGHT; |
205 | } | 204 | } |
206 | if (cursor->cursor->y >= cont->y + cont->height - view->border_thickness) { | 205 | if (cursor->cursor->y >= cont->y + cont->height - cont->border_thickness) { |
207 | edge |= WLR_EDGE_BOTTOM; | 206 | edge |= WLR_EDGE_BOTTOM; |
208 | } | 207 | } |
209 | 208 | ||