[Bug]: set_window_frame refuses to move a fixed-size window even when its size does not change
Primary area
Cua Driver
Summary
set_window_frame will not move a window whose size cannot be set, even when the requested width and height are the window's current ones. Calculator's window is one of these: asking to move it 40 points with the same size returns does not expose a settable AXSize and the window stays where it was.
Reproduction
- Open Calculator (its window has a fixed size).
- Run
cua-driver call list_windows '{"pid": <calculator pid>}'and note the titled window'swindow_idandbounds. - Run
cua-driver call set_window_framewith thatpidandwindow_id,xandymoved by 40, and the samewidthandheight.
Expected behavior
The window moves to the new position with its size unchanged, and the tool reports the frame as set and verified.
Actual behavior
$ cua-driver call set_window_frame '{"pid": 46734, "window_id": 50618, "x": 1828.0, "y": 100.0, "width": 230.0, "height": 408.0}'
set_window_frame: window_id 50618 does not expose a settable AXSize
list_windows afterwards still shows the window at x 1788, y 60, 230 by 408. The CLI prints this as plain text and exits 0.
Environment
Cua Driver 0.28.2 (cua-driver call from the CLI), macOS 26.3 (25D125), Apple silicon, Calculator. The window was on a second display (a DeskPad virtual display) on the active Space. The check behind the error does not look at the display, and it is unchanged on main at fb39144.
Evidence
mutate_and_verify returns the error whenever AXSize is not settable, before it compares the requested size with the current one:
https://github.com/trycua/cua/blob/fb3914475b9cba97376a6b9b739077cc0994d15f/libs/cua-driver/rust/crates/platform-macos/src/tools/set_window_frame.rs#L182-L190
AXPosition is settable on the same window: the AXPosition check just before it passes, and setting AXPosition directly through the accessibility API moves Calculator as expected.
Workaround and additional context
I move these windows with a small helper that sets AXPosition directly. The tool already has a position-only path (corrective_mutations returns POSITION_ONLY when the size matches), so requiring a settable AXSize only when the size actually changes might be enough, but I have not tried that.
Context: I park app windows on a virtual display so the driver can reach them while I work in a fullscreen app, and move them back with set_window_frame when the agent is done. Fixed-size windows are the ones that cannot come back that way.
Submission checks
- [x] I searched for duplicate issues and active pull requests.
- [x] This issue describes a single problem.
- [x] I removed credentials, private data, sensitive screenshots, and vulnerability details from this public report.