rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.1k stars 742 forks source link

Windows are not restored when dragging from Right Half #1259

Closed Eric-Chng closed 9 months ago

Eric-Chng commented 9 months ago

This is with default dragging preferences

Screen Shot 2023-09-14 at 5 59 30 PM

Steps To Reproduce:

  1. Drag window/use shortcut to right side to make it right half. Tested on Google Chrome and VSCode window
  2. Drag away from right half to try to restore
  3. Window is not restored and instead resized to be a little wider (but not by much) than it was as right half.

Notes:

macOS version: 12.6.3 Rectangle version: 0.67, 0.70 Logs if applicable (In Rectangle menu, hold option, "View Logging..."):

2023-09-14T17:55:42-07:00: AX sizing proposed: (840.0, 955.0), result: (840.0, 955.0)
2023-09-14T17:55:42-07:00: AX position proposed: (840.0, 25.0), result: (840.0, 25.0)
2023-09-14T17:55:43-07:00: AX sizing proposed: (840.0, 955.0), result: (840.0, 955.0)
2023-09-14T17:55:43-07:00: rightHalf | display: (0.0, 70.0, 1680.0, 955.0), calculatedRect: (840.0, 25.0, 840.0, 955.0), resultRect: (840.0, 25.0, 840.0, 955.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2023-09-14T17:55:45-07:00: AX position proposed: (825.0, 25.0), result: (825.0, 25.0)
2023-09-14T17:55:45-07:00: AX sizing proposed: (1438.0, 926.0), result: (855.0, 926.0)
rxhanson commented 9 months ago

Thanks for reporting and including details. This is kind of a weird restriction of resizing windows via the macOS accessibility API, and unfortunately there isn't a better way to handle it from the perspective of Rectangle. When using the accessibility API to tell the window which size to make a window, it will crop the window so that none of it appears offscreen. It's been a little while since I tested things out for this issue, but I remember trying to adjust the location of the window on drag so that more of it appeared on screen and it didn't work well.

Eric-Chng commented 9 months ago

Gotcha, so for now there's no fix other than to use the keyboard shortcut?

rxhanson commented 9 months ago

That's correct.