A window dropped below the 27-inch display can end off-screen on the built-in display#390

opened1d agobySSamanyu Das

Found while verifying #388 on 8 November 2026. A window dropped below the 27-inch display's bottom edge can end in the built-in display's strip, off-screen to the left, instead of back in its column on the 27-inch display.

Steps to reproduce

  1. Run Miri Developer from main at 3dc50c83 (engine c61a547) with T3 Code (Nightly) tiled in a 1676 by 1394 column on the 27-inch display, and Magnet running.
  2. Drag T3 Code by its title bar so its top edge ends near y=1150 to 1250, well below the middle of the 27-inch display, and release.
  3. Within a moment, press Magnet's top-right quarter shortcut, Control-Option-I.
  4. Repeat. It happened in about 1 of 10 drops. A tool did the drags by Accessibility and pressed Magnet's shortcut 20 ms after release, and a recorder read window frames every 5 ms.

Expected result

The window returns to its column on the 27-inch display, where the pointer was released, as #314's criteria ask.

Actual result

The window ended in the built-in display's strip, 1676 by 1270, at x from -1405 to 238, so in most drops wholly off-screen to the left. Miri kept managing it there. It happened on main at 3dc50c83 in 3 of 29 drops (verify-miri runs 20261108-220752, 20261108-231724, 20261108-232149), and with paneru#147 in 7 of 76 drops (runs 20261108-222853, 20261108-223843, 20261108-225525 to 20261108-230310, 20261108-230945 to 20261108-231455).

A traced drop (verify-miri run 20261108-223843, drop 12), with times from the release:

text
1-0.08 s macOS moves T3 Code to the built-in display (y=1486) during the drag, as Accessibility moves of most of a window do with separate Spaces on
2+0.05 s Miri writes the window's slot on the 27-inch display, and keeps writing it during the 1 s tile hold
3+0.05 to +1.33 s the window's frame alternates between the slot (y=34) and the built-in display (y=1482) after each write
4+1.34 s Miri puts the window into the built-in display's strip and lays that strip out, with no log line that says why

It also happened once without a snapping app, in a plain drop under load (run 20261109-004100, drop 30, load average 12.4).

The cause is not confirmed: the trace lines do not cover the code that moves a window between displays' strips. No window became unreachable: the window could be focused and moved back with Miri's move-to-display command.

Acceptance criteria

  • An engine test with a window that macOS moves to another display during a drop, and that macOS keeps moving back after the engine's writes for up to 1.3 s, keeps the window in the strip of the display the pointer was released on: it fails before the fix and passes after it (make engine-test).
  • Following the steps above, T3 Code returns to its column on the 27-inch display in 20 of 20 drops. Check with a 5 ms frame recording in a verify-miri run.

Miri version or commit

main at 3dc50c83, engine c61a547, and paneru#147 at 1d3de92 and 9e594e5

macOS version and Mac model

macOS 27.0.1 (26A434), MacBook Air M3 (Mac15,12)

Displays and arrangement

27-inch external display (2560 by 1440 points, origin 0,0) above the built-in display (2048 by 1332 points, origin 266,1440), with "Displays have separate Spaces" on

Diagnostics or logs

Engine trace and frame recording of the traced drop are in ~/.cache/miri/verify-miri/runs/20261108-223843/m388/ on Sam's Mac (log-d12.txt, rec-d12.txt).