Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way
cmd_move_direction
currently preserves focus is by saving it beforehand, and applying it after. As far as I can tell, the only reason this is required is becausemove_to_output_directed
has unexpected behavior in the case of moving multiple windows otherwise. Since it usesworkspace_show
in an unusual way(That is, with focus on the other workspace), it ends up focusing on one of the internal windows of the container, instead of the container itself.I kept
workspace_show
because the comment before it seems to indicate that it does some important work, even though it doesn't update focus correctly in this case. I'd like this to be looked at from a more experienced eye to tell me whether I'm essentially undoing that work usingcon_focus
, or if theworkspace_show
is necessary there versus some alternative method of getting those things done. I'll come back on that if nobody else does for a while.This pull request is a precursor to #5521, since that needs to change focus in
tree_move
to work as expected.