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 visuals when floating window #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Darukutsu
Copy link

after-before.webm
Well this isn't finished, consider this more like issue, because it doesn't take in mind windows which are taken to floating state from tiled. The problem was that floating windows can be transfered to other desktop(e.g. my dropdown terminal) and this will trigger __initialize_layout & __recalculate_layout.

@Darukutsu
Copy link
Author

latest commit fixes nodes which are taken from any state to floating, nodes hiding and reappearing and floating node transfers. I tested this on grid and tall layouts.

Also discovered something which is quite annoying in tall layout. Consider you have 4 nodes and focusing 3rd and then immediately master and removing master won't change previous node to master rather all will be on same size horizontally oriented. I'm now trying:

bspc config removal_adjustment          true
bspc config automatic_scheme            spiral
bspc config initial_polarity            first_child

and can't reproduce it, but --master-size option looks like is ignored. I honestly have no idea. I will try to record behavior to explain more easily.

@Darukutsu
Copy link
Author

Darukutsu commented Jun 2, 2023

There is also 1 last problem which I don't know how should be fixed. If floating window is created it will trigger node_add event and then node_state tiled off > node_state floating on. We refresh layout line by line so we cannot ignore node_add or wait until node_state appears since if normal window is created only node_stack,geometry,focus are evaluated. I had to left node_remove unaltered since node_add can still mangle with layout. This causes visual glitches but should alter layout.

@Darukutsu
Copy link
Author

I've been using this for almost week since previous changes weren't working apparently. This should be OK. Someone else should test it.

For @() bashism we could use commented if because (at least for me) it breaks nvim-treesitter parsing I guess. Also I use beautysh autoformatter so sorry if something what shouldn't be formatter was.

Removing/hiding/transfering master window in tall layout in some cases broke (for me) layout completely (see img hidden window was also floating - this was before my commits) therefore don't use descendant_of.
Screenshot_2023-06-11-13-40-52_1920x1080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant