src/cursor.c: Fix branch condition for out-of-view selecting/dragging

Instead of using the stored view for comparison use the actual surface.

Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.

Partly fixes #340
Fixes #347

Backport of 6dd290afc9
This commit is contained in:
Consolatis 2022-05-24 13:02:51 +02:00 committed by Johan Malm
parent ae15be8555
commit cc0e2769d9
4 changed files with 30 additions and 17 deletions

View file

@ -88,8 +88,9 @@ handle_destroy(struct wl_listener *listener, void *data)
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel_handle);
}
interactive_end(view);
if (view->server->seat.active_view == view) {
view->server->seat.active_view = NULL;
if (view->server->seat.pressed.view == view) {
view->server->seat.pressed.view = NULL;
view->server->seat.pressed.surface = NULL;
}
view->xwayland_surface = NULL;
wl_list_remove(&view->link);