677e112733
To reproduce the problem, create layout H[view V[view view view-focused]], then switch to another workspace and have the previously focused view in the vsplit close (eg. using criteria, or an mpv video finishing). Return to the workspace using `$mod+<num>` and the entire vsplit would be focused. This happens because handle_seat_node_destroy would only set a new focus if the currently focused view or a parent was being destroyed. To fix it, it needs to set a sibling of the destroying container to focus_inactive regardless of the current focus, then restore current focus if needed. This patch changes the function accordingly. Additionally: * The function now makes an early return if the node being destroyed is a workspace. * set_focus has been renamed to needs_new_focus. This variable is true if the head focus needs to be changed. |
||
---|---|---|
.. | ||
commands | ||
config | ||
desktop | ||
input | ||
tree | ||
base64.c | ||
commands.c | ||
config.c | ||
criteria.c | ||
debug-tree.c | ||
decoration.c | ||
ipc-json.c | ||
ipc-server.c | ||
main.c | ||
meson.build | ||
security.c | ||
server.c | ||
sway-bar.5.scd | ||
sway-input.5.scd | ||
sway.1.scd | ||
sway.5.scd | ||
swaynag.c |