1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 14:53:52 +01:00

Merge pull request #2346 from RyanDwyer/fix-crash-on-click

Fix crash when clicking certain surfaces
This commit is contained in:
Drew DeVault 2018-07-24 07:50:55 -04:00 committed by GitHub
commit 347f7cb4c1
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -570,7 +570,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
// Handle mouse bindings
bool on_border = find_resize_edge(cont, cursor) != WLR_EDGE_NONE;
bool on_border = cont && (find_resize_edge(cont, cursor) != WLR_EDGE_NONE);
bool on_contents = !on_border && surface;
bool on_titlebar = !on_border && !surface;
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(cursor->seat->wlr_seat);