Finds a frame to fill the empty space left behind by a moved/empty frame (e.g. a dragged frame's original position).
Returns a LayoutChange with the information necessary information..
Changes can be applied to a window with applyFrameChanges.
Examples where * would be the empty space:
Selection priority:
Prefer frames listed in preferredFrames (for dragging these are the dragged and target frames).
┌─────┬─────┐
│A │* │
├─────┼─────┤
│C │B │
└─────┴─────┘
Without preferredFrames set to B, A would be preferred as it shares the shortest edge with the empty space.
If preferredFrames is C OR D (usually it's both but it might only be one, just take all other frames along that edge if they end at the empty frames end).
Finds a frame to fill the empty space left behind by a moved/empty frame (e.g. a dragged frame's original position).
Returns a LayoutChange with the information necessary information..
Changes can be applied to a window with applyFrameChanges.
Examples where * would be the empty space:
Selection priority:
Without preferredFrames set to B, A would be preferred as it shares the shortest edge with the empty space.
┌─────┬─────┐ │A │B │ ├─────┤ │ │C │ │ └─────┴─────┘
In a more complex example:
┌─────┬─────┬─────┐ │A │* │C │ │ │ ├─────┤ │ │ │D │ └─────┴─────┴─────┘
If preferredFrames is C OR D (usually it's both but it might only be one, just take all other frames along that edge if they end at the empty frames end).
┌─────┬──────────┐ │A │C │ │ ├──────────┤ │ │D │ └─────┴──────────┘
And then in the following we would not be able to even expand C or D so we would not be able to satisfy the preference:
┌─────┬─────┬─────┐ │A │* │C │ │ │ ├─────┤ │ │ │ │ │ ├─────┤D │ │ │B │ │ └─────┴─────┴─────┘
┌─────┬─────┬─────┐ │A │B │C │ │ │ ├─────┤ │ │ │ │ │ │ │D │ │ │ │ │ └─────┴─────┴─────┘