A method comprising: at a device with one or more processors , non-transitory memory, a display , and an input device: displaying, on the display , a first window and a second window within a display area , the first window having a first edge parallel to a second edge of the second window ; detecting a first user input, via the input device, moving the first edge of the first window toward the second edge of the second window ; and in response to detecting the first user input: in accordance with a determination that the first user input satisfies one or more pairing criteria, pairing the first edge of the first window to the second edge of the second window such that the first window stops moving in response to the first user input before it overlaps the second window , wherein the one or more pairing criteria include a first pairing criterion that is met when the first user input corresponds to movement of the first edge toward the second edge that deviates from a predefined axis by less than an angular threshold value; and in accordance with a determination that the first user input does not satisfy the one or more pairing criteria, continuing the movement of the first window based on the first user input so that the first window at least partially overlaps the second window . displaying, on the display , a first window and a second window within a display area , the first window having a first edge parallel to a second edge of the second window ; detecting a first user input, via the input device, moving the first edge of the first window toward the second edge of the second window ; and in response to detecting the first user input: in accordance with a determination that the first user input satisfies one or more pairing criteria, pairing the first edge of the first window to the second edge of the second window such that the first window stops moving in response to the first user input before it overlaps the second window , wherein the one or more pairing criteria include a first pairing criterion that is met when the first user input corresponds to movement of the first edge toward the second edge that deviates from a predefined axis by less than an angular threshold value; and in accordance with a determination that the first user input does not satisfy the one or more pairing criteria, continuing the movement of the first window based on the first user input so that the first window at least partially overlaps the second window . in accordance with a determination that the first user input satisfies one or more pairing criteria, pairing the first edge of the first window to the second edge of the second window such that the first window stops moving in response to the first user input before it overlaps the second window , wherein the one or more pairing criteria include a first pairing criterion that is met when the first user input corresponds to movement of the first edge toward the second edge that deviates from a predefined axis by less than an angular threshold value; and in accordance with a determination that the first user input does not satisfy the one or more pairing criteria, continuing the movement of the first window based on the first user input so that the first window at least partially overlaps the second window . <EOS>