Properly focus container when it changes parent

When a parented container changes parent, sway will render a sibling
non-focused container.

Revert deletion of code which introduced this regression.

Fixes: 5e18ed3cf0
Fixes: https://github.com/swaywm/sway/issues/8292
This commit is contained in:
Hugo Osvaldo Barrera 2025-01-07 15:21:05 +01:00
parent 801bc76ce3
commit f0731de2d3

View file

@ -770,6 +770,10 @@ static struct cmd_results *cmd_move_in_direction(
ipc_event_window(container, "move"); ipc_event_window(container, "move");
} }
// Re-focus re-parented container.
seat_set_raw_focus(config->handler_context.seat, &new_ws->node);
seat_set_focus_container(config->handler_context.seat, container);
container_end_mouse_operation(container); container_end_mouse_operation(container);
return cmd_results_new(CMD_SUCCESS, NULL); return cmd_results_new(CMD_SUCCESS, NULL);