Improves the screenshot selection UX by ensuring the selection
rectangle stays within the window.
**Changes**
- Clamp the selection rectangle while dragging the cursor,
preventing it from extending outside the window.
- When shifting the selection area, movement is constrained
so that the entire rectangle remains within the window.
- When `force_square` is `true`, the square is clamped to the
largest possible square that fits within the window bounds
if it would otherwise exceed them.
Pull Request: https://projects.blender.org/blender/blender/pulls/139805