Delay refocus until after arranging nodes

i3 determines focus after it arranges its nodes, so the ipc events
that follow have the newly updated window geometry.
This commit is contained in:
Ronan Pigott 2020-12-13 00:49:31 -07:00
parent ba943c694c
commit c44ffa2be5
2 changed files with 1 additions and 2 deletions

View file

@ -97,8 +97,6 @@ void container_begin_destroy(struct sway_container *con) {
container_fullscreen_disable(con); container_fullscreen_disable(con);
} }
wl_signal_emit(&con->node.events.destroy, &con->node);
container_end_mouse_operation(con); container_end_mouse_operation(con);
con->node.destroying = true; con->node.destroying = true;

View file

@ -844,6 +844,7 @@ void view_unmap(struct sway_view *view) {
seat_consider_warp_to_focus(seat); seat_consider_warp_to_focus(seat);
} }
wl_signal_emit(&view->container->node.events.destroy, &view->container->node);
transaction_commit_dirty(); transaction_commit_dirty();
view->surface = NULL; view->surface = NULL;
} }