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
This commit is contained in:
Consolatis 2022-05-24 13:02:51 +02:00 committed by Johan Malm
parent fbcdf38b52
commit 6dd290afc9
3 changed files with 27 additions and 15 deletions

View file

@ -686,8 +686,9 @@ view_destroy(struct view *view)
}
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;
}
if (view->server->cycle_view == view) {