]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: Clear grabbed_view when switching from MOVE/GRAB
authorJoshua Ashton <joshua@froggi.es>
Fri, 3 Dec 2021 08:12:37 +0000 (08:12 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 3 Dec 2021 18:11:31 +0000 (18:11 +0000)
Better not to leave a dangling pointer to screw us over later.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
src/cursor.c

index 5cee3f291b7609ce05cdf82ba2f012965ca2a24b..118a982f6c340da9939b7919451bd8ac85ea6de6 100644 (file)
@@ -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);
                }