feat: next/prev follows spatial layout, instead of MRU window list#471
feat: next/prev follows spatial layout, instead of MRU window list#471jessedhillon wants to merge 1 commit intodomferr:mainfrom
Conversation
|
Hi @domferr if you recall, I implemented the MRU feature. This replaces MRU with a more predictable next/previous that is spatially aware |
|
Hi @jessedhillon sorry for the late reply. Yeah I recall, very cool feature! I appreciate your contributions to Tiling Shell 🥳 What I didn't understand is that there are spatial keybindings already (focus window to the left, right, above and below). Changing the MRU to spatial is going to implement the same no? And we will remove any MRU-like focus. What am I missing? |
|
Hi @domferr, yes you're right. It was confusing for me to call this "spatially-aware" also. I'll explain it differently:
The MRU ordering was written before I knew very much about GNOME's windowing system, otherwise I would have written this to begin with. |

This feature updates the feature introduced in #195: instead of next/previous window being determined by the window list, which is ordered by most recent use, we now apply a spatial ordering. The next window is the window which has the nearest equal or right X coordinate, with ties broken by comparing which one is closer to the top of the screen. In other words, we seek the window which is below us, then the window which is right of us, within the current desktop. At the edge of the desktop, we flip to the next desktop (determined similarly) and start the order again.
There's a picture included in the README which explains this. If desired, I can record a video to show the updated behavior as well.