swayfx/sway/input
Ryan Dwyer 677e112733 Set focus_inactive on a sibling when a container closes in an inactive workspace
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.
2018-10-02 15:45:20 +10:00
..
cursor.c Turn funcs() into funcs(void) 2018-09-30 14:09:05 +03:00
input-manager.c add tap-and-drag setting to sway-input 2018-09-29 11:49:41 +02:00
keyboard.c Fix management of bindings during reload 2018-09-06 08:33:00 +10:00
seat.c Set focus_inactive on a sibling when a container closes in an inactive workspace 2018-10-02 15:45:20 +10:00