Realtime window resizing to maximize dimensions without overlapping other windows