input/cursor: keep reference to cursor in constraint

set_region accepts a NULL *data, so we can't use it to reference the
constraint and find the cursor through its seat.

Fixes #5386.
This commit is contained in:
Tudor Brindus 2020-05-26 10:05:33 -04:00 committed by Simon Ser
parent 34e0cad9ac
commit d71fed95da
2 changed files with 4 additions and 5 deletions

View file

@ -111,6 +111,7 @@ struct sway_seat {
};
struct sway_pointer_constraint {
struct sway_cursor *cursor;
struct wlr_pointer_constraint_v1 *constraint;
struct wl_listener set_region;