view: fix regression whereby cursor is not updated

...on view destruction because focus_change_notify() in seat.c changes
server->active_view so the logic introduced by 6c6e406 (which checks if
view =! active_view) is no longer right.

The glitches described in the commit below have not come back.
6c6e406507

Fixes #1393
This commit is contained in:
Johan Malm 2024-01-19 20:27:23 +00:00 committed by Johan Malm
parent c066821046
commit f73e9ded1c

View file

@ -2046,7 +2046,6 @@ view_destroy(struct view *view)
{
assert(view);
struct server *server = view->server;
bool need_cursor_update = false;
if (view->mappable.connected) {
mappable_disconnect(&view->mappable);
@ -2068,13 +2067,11 @@ view_destroy(struct view *view)
/* Application got killed while moving around */
server->input_mode = LAB_INPUT_STATE_PASSTHROUGH;
server->grabbed_view = NULL;
need_cursor_update = true;
regions_hide_overlay(&server->seat);
}
if (server->active_view == view) {
server->active_view = NULL;
need_cursor_update = true;
}
if (server->last_raised_view == view) {
@ -2130,7 +2127,5 @@ view_destroy(struct view *view)
wl_list_remove(&view->link);
free(view);
if (need_cursor_update) {
cursor_update_focus(server);
}
}