From: Joshua Ashton Date: Fri, 3 Dec 2021 08:12:37 +0000 (+0000) Subject: cursor: Clear grabbed_view when switching from MOVE/GRAB X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f9f9d809c8b0fd05f40333e3686a7ee0fc746dee;p=proto%2Flabwc.git cursor: Clear grabbed_view when switching from MOVE/GRAB Better not to leave a dangling pointer to screw us over later. Signed-off-by: Joshua Ashton --- diff --git a/src/cursor.c b/src/cursor.c index 5cee3f29..118a982f 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -551,6 +551,7 @@ cursor_button(struct wl_listener *listener, void *data) if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) { /* Exit interactive move/resize/menu mode. */ server->input_mode = LAB_INPUT_STATE_PASSTHROUGH; + server->grabbed_view = NULL; cursor_rebase(&server->seat, event->time_msec); }