Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix node swapping when not a leaf node #3

Closed
diogox opened this issue Feb 17, 2021 · 5 comments
Closed

Fix node swapping when not a leaf node #3

diogox opened this issue Feb 17, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@diogox
Copy link
Owner

diogox commented Feb 17, 2021

Reported here.

Should just be a matter of querying the swapped node and make sure that it's a leaf node.
If not, I need to get its children and handle each one of them accordingly.

It begs the question: Which leaf node should be focused in the destination's monocle mode? The biggest one?

@ortango
Copy link

ortango commented Feb 17, 2021

It begs the question: Which leaf node should be focused in the destination's monocle mode? The biggest one?

i believe as it works now in bspwm what would happen is:

  • if there was a focused window in that tree it would get focus.
  • if the focused node was not a leaf then it would end up focusing the "last" window (i'm not sure of the right word, i don't mean last focused, or the deepest, but last if you traversed the tree in order).

@diogox diogox added the bug Something isn't working label Feb 17, 2021
@diogox diogox closed this as completed in 24675b3 Feb 17, 2021
@diogox
Copy link
Owner Author

diogox commented Feb 17, 2021

I've pushed v0.0.3 that, I believe, fixes non-leaf node swapping. Could you check if it's been fixed on your machine as well?

It doesn't however, handle it in the way you described. It will focus a "random" node from the swapped tree.

To implement the behavior you described, I'll have to do some refactoring.

I'll create a new ticket to implement the correct behavior once that's done.

@diogox
Copy link
Owner Author

diogox commented Feb 17, 2021

Reopening until I have your confirmation. To avoid forgetting about this

@ortango
Copy link

ortango commented Feb 18, 2021

yep happy to confirm this seems fixed here.

i'll update the other issue with a comment describing the exact behavior when i get some time. i believe that the actual behavior is a little different then what i initially posted.

@diogox
Copy link
Owner Author

diogox commented Feb 18, 2021

Great ^^
Closing this then!

@diogox diogox closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants