Open derac opened 2 years ago
CC @SeraphimaZ
I just realized there is a possible infinite loop when you have two zones with the same midpoint or very close midpoints on the same horizontal or vertical line. I'm not sure how you might resolve that.
I thought of a way to get around the infinite looping on near neighbors problem, you could look at a 90 degree quadrant in the direction of the arrow pressed. For midpoints sharing the same exact coordinate, you could store a z-axis and traverse down it when pressing (win+left/down) or up it for (win+up/right). At the bottom or top of the z-axis, respectively you could prefer points not sharing the same coordinates. THEN if there is no matching coordinate, you could search the space in the full half plane (in gray). Though somewhat complicated, I think this aligns really well with user expectations.
I'm getting an idea of how complicated this problem is. I could obviously be totally wrong. Maybe you could just expose a setting for the state diagram of your window layout. :D
Description of the new feature / enhancement
State diagram of desired behavior with Windows Snap override. Criticism of current behavior in supporting information.
A potential algorithm might be the following. The currently selected window can be anywhere on the screen when this runs and it should have good results. This could even take other screens into account. This is essentially better relative mode.
Scenario when this would be used?
Supporting information
No combination of settings for "Move window based on" gives this behavior. The way this actually works is a mess. Particularly when combining FancyZone land with Windows Snap land by letting it handle up and down. However, with relative position mode, up will never go from left to full. It would be useful to think about the full + half + quarters case as well, as that also cycles between stuff on the left side of the screen and never goes full.
Additionally, the way this feature works when snapping by dragging to the edge is unpredictable as well, as this brings you into Windows Snap land.