raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

ioncore.goto_next directionals not really working in floating #365

Open kristopolous opened 9 months ago

kristopolous commented 9 months ago

This "bug" has been biting me for I hate to say years but I guess I'm too lazy to have actually looked into it.

In the floating mode, the lua ioncore.goto_next(_chld, 'left') and ioncore.goto_next(_chld, 'right') should probably work like this:

Look at the current window focus top left coordinates. Go to the closest window on the left or right with respect to that. If they are on the same left or right distance coordinate then go to the one whose ABS (up/down) distance is closest. If those are the same, then prefer the LRU in the window stack.

That would allow a deterministic traversal in floating mode and the positioning of windows to act as the focus ring, it's a really powerful mechanism.

Right now it just does some rather unpredictable behavior that I can't really determine. I haven't looked deep into the code.