aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-24 07:50:55 -0400
committerLibravatar GitHub <noreply@github.com>2018-07-24 07:50:55 -0400
commit347f7cb4c1edb3c4a6c38ffb3f9dcdd98f37e475 (patch)
treed4f05f94a3b549eb66214022525527804ca7a7f6
parentMerge pull request #2344 from RyanDwyer/mod-resize-any-direction (diff)
parentFix crash when clicking certain surfaces (diff)
downloadsway-347f7cb4c1edb3c4a6c38ffb3f9dcdd98f37e475.tar.gz
sway-347f7cb4c1edb3c4a6c38ffb3f9dcdd98f37e475.tar.zst
sway-347f7cb4c1edb3c4a6c38ffb3f9dcdd98f37e475.zip
Merge pull request #2346 from RyanDwyer/fix-crash-on-click
Fix crash when clicking certain surfaces
-rw-r--r--sway/input/cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 8a6299cf..27597640 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -570,7 +570,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
570 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); 570 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
571 571
572 // Handle mouse bindings 572 // Handle mouse bindings
573 bool on_border = find_resize_edge(cont, cursor) != WLR_EDGE_NONE; 573 bool on_border = cont && (find_resize_edge(cont, cursor) != WLR_EDGE_NONE);
574 bool on_contents = !on_border && surface; 574 bool on_contents = !on_border && surface;
575 bool on_titlebar = !on_border && !surface; 575 bool on_titlebar = !on_border && !surface;
576 struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(cursor->seat->wlr_seat); 576 struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(cursor->seat->wlr_seat);