swayfx/sway
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
..
commands Handle border options for gaps 2018-10-01 21:19:06 -04:00
config Merge pull request #2725 from PumbaPe/add-tap-and-drag 2018-09-30 13:44:11 +02:00
desktop transaction: do not use pointers for state 2018-09-28 09:18:24 +01:00
input Set focus_inactive on a sibling when a container closes in an inactive workspace 2018-10-02 15:45:20 +10:00
tree Handle border options for gaps 2018-10-01 21:19:06 -04:00
base64.c Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
commands.c Handle border options for gaps 2018-10-01 21:19:06 -04:00
config.c Handle border options for gaps 2018-10-01 21:19:06 -04:00
criteria.c Parse floating criteria 2018-09-30 19:59:32 +03:00
debug-tree.c Turn funcs() into funcs(void) 2018-09-30 14:09:05 +03:00
decoration.c Handle views created after decoration mode is sent for xdg-shell 2018-08-06 15:20:30 +01:00
ipc-json.c Turn funcs() into funcs(void) 2018-09-30 14:09:05 +03:00
ipc-server.c Make sway/ipc-server.c POSIX 2001 compliant 2018-09-26 20:10:53 +02:00
main.c Add support for installing binaries with DT_RPATH 2018-09-30 15:37:01 +03:00
meson.build Handle border options for gaps 2018-10-01 21:19:06 -04:00
security.c Add minimal config subsystem 2017-12-05 10:40:55 +01:00
server.c Merge branch 'master' into wlroots-1243 2018-09-14 21:03:59 -04:00
sway-bar.5.scd sway{,bar,input}.5: changes for generic blocks 2018-09-28 13:30:54 -04:00
sway-input.5.scd Merge pull request #2725 from PumbaPe/add-tap-and-drag 2018-09-30 13:44:11 +02:00
sway.1.scd delete references to swaygrab 2018-07-30 16:24:46 +01:00
sway.5.scd Handle border options for gaps 2018-10-01 21:19:06 -04:00
swaynag.c Fix compiler errors. 2018-08-05 00:24:44 -07:00