Skip to content

fix visuals when floating window#72

Open
darukutsu wants to merge 6 commits intophenax:masterfrom
darukutsu:master
Open

fix visuals when floating window#72
darukutsu wants to merge 6 commits intophenax:masterfrom
darukutsu:master

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

After 2 years bspwm got updated and I encountered issues. Came back to
this script and realized there were unnecessary changes.
The only thing I'm missing from phenax#73 is fix for grid and
even layout, since floating windows mangle with this. Feel free to close
in favor of phenax#73 if implemented.
@darukutsu
Copy link
Author

darukutsu commented Sep 30, 2025

sorry for copying your stuff but it fixed some of problems this PR had too... maybe sign marcxjo and nullman as coauthors or cherrypick changes or close... Anyway happy bspwm release after what was it 5 years :D?
Edit: experienced some bugs, will fix later

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.

1 participant