]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: fix regression whereby cursor is not updated
authorJohan Malm <jgm323@gmail.com>
Fri, 19 Jan 2024 20:27:23 +0000 (20:27 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 19 Jan 2024 20:37:23 +0000 (20:37 +0000)
...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.
https://github.com/labwc/labwc/commit/6c6e406507bfb0e9a809b74029b5b05b5a095768

Fixes #1393

src/view.c

index eac7893d32cbd355aaebb01893293f7f50899d26..55424f583377d01e0ef56238c7d0f5430dac2a37 100644 (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);
-       }
+       cursor_update_focus(server);
 }