diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-02 15:42:16 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-02 15:45:20 +1000 |
commit | 677e112733c0294f338f7803207e4e2b16146d08 (patch) | |
tree | 056c9c6702ac2753b526c41d5ad857543cab51d2 /sway/commands/create_output.c | |
parent | 183a4b0d6bbd17199d7071bfe5b76feb87838c18 (diff) |
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.
Diffstat (limited to 'sway/commands/create_output.c')
0 files changed, 0 insertions, 0 deletions