Repository navigation
Conversation
The composition swapchain is made with DXGI_SCALING_NONE where the system accepts it, STRETCH otherwise. WM_ENTERSIZEMOVE grows the buffers once to the monitor work area and WM_EXITSIZEMOVE shrinks them back, so a drag step refits nothing. Each frame draws the top-left w x h, sets the source size to it and clips the visual to it in the batch the commit sends. Skia is told the drawn size, not the buffer size. If SetSourceSize is refused, buffers are refitted per step as before. Step 1 of the design in #164.
…ositor WM_NCCALCSIZE (wParam TRUE) now reads the client rectangle the window is about to have from rgrc[0], after the custom caption adjustment it already made, and draws, presents with interval 0, clips, commits and waits for the commit and the next compositor tick (DCompositionWaitForCompositorClock resolved at run time, DwmFlush where it is absent) before returning. The WM_SIZE that follows skips its draw when that size is already presented. Client size readers use the pending size while this runs. Step 2 of the design in #164.
When WM_NCCALCSIZE brings a smaller size, the frame drawn there is presented with the source size and clip still at the old (larger) size, so the old window rectangle stays covered for the tick before it shrinks. The WM_SIZE that follows then presents the new size. Outside a drag the buffers are grown to the held size for that frame. Step 3 of the design in #164.
dxc_native_debug_resize takes the window through stepwise SetWindowPos calls between WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE, so each step goes through WM_NCCALCSIZE and WM_SIZE as a dragged edge does. dxc_native_debug_key posts WM_KEYDOWN, WM_CHAR and WM_KEYUP. The Win32 loop now calls both for DXC_SYNTH's resize and keys modes, as the AppKit loop does.
Drops the held old source size from the previous commit: it showed whatever the buffer last held between the new and old edge, which is a previous frame. Every frame now sets source size and clip to what it drew before its present and commit. On shrink WM_NCCALCSIZE returns without the compositor wait so the commit and the smaller rectangle aim at the same compositor frame; on grow it still waits. One draw per step either way. DXC_REPORT_LATENCY prints each step's draw, present, commit and wait time in ms.
…ouches it test.yml only runs on pull requests into main, and the GraalVM workflow ignores the exit status of the JVM run that compiles it, so a compile error in Win32Window.kt surfaced only on Windows hardware.
CreateSwapChainForComposition requires DXGI_SCALING_STRETCH, so the NONE attempt always fell back to STRETCH, and with STRETCH the source size region is stretched over the whole buffer on the visual. Drawing w x h of a work-area-sized buffer therefore showed it magnified. The visual now carries a scale of shown/buffer and a clip of the buffer extent, set in the batch each commit sends. stderr says the swapchain's scaling mode once; DXC_REPORT_LATENCY prints every scale and clip change.
…g it A composition swapchain is always DXGI_SCALING_STRETCH, which is 1:1 only when the buffer is the frame's size. The oversized buffer needed a source size (applied at Present) and a visual scale (applied at Commit), and a frame landing with one but not the other is a stretched frame. Both are gone, with the clip: every step ResizeBuffers to exactly w x h, draws, presents and commits, with the same compositor wait policy. The DXC_REPORT_LATENCY step time now includes the refit.
Following Flutter's Windows embedder (flutter/flutter 53d381d9, shell/platform/windows): a flip model swapchain on the window itself, DXGI_SCALING_NONE, with the redirection surface kept. DirectComposition is removed with win32_dcomp.cpp/.h; the window has no backdrop material that needs it (dxc_native_window_configure ignores backdrop on Win32). WM_NCCALCSIZE is back to its caption adjustment only. WM_SIZE records the size and, before returning, refits the buffers to exactly w x h, draws, presents with interval 0 and calls DwmFlush when DWM composition is on. A resize frame presents only at the recorded size and only once per size. The step is capped at 100 ms (DwmFlush is skipped past it, and the cap is logged). WM_PAINT draws only when no resize is in flight. The startup log names the path; DXC_REPORT_LATENCY prints each step's time.
Skipping DwmFlush once a step passed 100 ms let WM_SIZE return before DWM had our frame, so DWM showed the resized redirection surface, which is black (hardware capture of fe82373, frames 69 to 71, next to two cap hits at 2880x1704 and 1394x1407). The step now always flushes after a present; the cap line is still logged. Also splits the step time under DXC_REPORT_LATENCY: GPU idle before the refit, ResizeBuffers, the renderer's draw, present and DwmFlush, and on the Kotlin side Skia surface creation, layout and draw, and flush with the GPU wait.
Hardware capture of 0415d30's parent showed black at the right and bottom during a diagonal grow drag in which every step was presented and flushed in WM_SIZE: by WM_SIZE, SetWindowPos has already grown the window and its redirection surface, and DWM can compose the cleared new area before the present lands. On grow, WM_NCCALCSIZE (wParam TRUE) now takes the new client rectangle from rgrc[0] after the caption adjustment, refits to it, draws, presents and DwmFlushes before returning. With DXGI_SCALING_NONE the larger buffer is shown unscaled at the top left and cut by the old window until it grows. Shrink stays in WM_SIZE. The system chrome path keeps DefWindowProc's answer.
… does Flutter's window swapchain (ANGLE NativeWindow11Win32 without DirectComposition) is DXGI_SWAP_EFFECT_SEQUENTIAL, one buffer, STRETCH: Present copies into the window's redirection surface, which DWM resizes with the window, so size and content arrive together. The flip model swapchain composed apart from the window bounds and showed the unpainted surface (black) at a growing edge. Skia stays on Direct3D 12 and draws into a texture of its own; each frame it is copied through D3D11On12 into a Direct3D 11 copy model swapchain on the window. Resizing stays in WM_SIZE (refit to exactly w x h, draw, copy, Present, DwmFlush); the early present from WM_NCCALCSIZE is removed. One GPU copy per frame. DXC_REPORT_LATENCY adds the copy to the step timing; startup logs the swapchain model.
Diagnostic only, off by default: a capture can then tell content drawn late (cyan shows) from a present that was late or missing (black).
…esent GPU wait The Direct3D 12 texture Skia draws into and its D3D11On12 wrapper now grow only when too small (to at least the monitor, rounded up to 256), so a drag step no longer creates a committed resource and a wrapper before presenting; only the drawn region is copied into the swapchain. The full GPU wait after every present is gone: the queue runs Skia's next work after the copy in order, and the barrier list's allocator is reset only after a fence on that list says it has run. A refit still waits for the GPU before releasing anything.
On by default: entering and leaving the size-move loop, maximise, minimise and restore, DPI changes, the swapchain's model and size, draw texture growth, failed ResizeBuffers/GetBuffer/Present (with the device removed reason), and every skipped resize present with its reason.
A lost redirection surface (restore, uncover, display change) stayed black until the scene next changed, because WM_PAINT drew only mid-drag.
With no Skia surface the frame was still ended, which issued a render target to present barrier on a texture already in the present state.
During a drag the UI thread runs above normal, and the Direct3D 12 queue is created high priority (only global realtime needs privileges). Both are on by default; DXC_RESIZE_PRIORITY=0 turns them off for comparison, and =1 also sets the D3D11 device's GPU thread priority to +5, which the docs warn can slow rendering if misused. Startup logs which are active.
At startup, on WM_DPICHANGED, WM_DISPLAYCHANGE and whenever WM_MOVE puts the window on another monitor: the monitor, its DPI, the LUID of the adapter driving it and of the adapter the device was made on, and whether they differ.
A per monitor aware (v2) window must SetWindowPos the rect WM_DPICHANGED suggests; it was ignored, so moving between monitors of different scaling kept the old pixel size and the scene was drawn at a new density with no resize step to present it.
GetSystemMetrics answers for the primary monitor's DPI, so on a monitor of another scale the maximised caption inset and top resize band were off.
…ings DXC_METRICS=1 dirties the heap three seconds in and then drags the window through 100 scripted sizes, printing per frame its time and the collections that ran (GarbageCollectorMXBean). DXC_SVM_OPTIONS passes runtime options to the native image isolate (version 3 isolate params), so -XX:+PrintGC -XX:+VerboseGC and heap sizes can be set per run. test-resize-gc.yml builds the macOS GraalVM renderer and runs it with the default heap, a large heap and young generation, and a tiny one.
DXC_D3D12_WARP=1 draws with the software adapter where there is no other, as the Kotlin/Native branch already does, so both branches carry the same win32_window.c. dxc_native_report_metrics prints working set, private bytes, local and non-local video memory and the draw texture size.
Member
Author
|
Resize GC experiment, macOS GraalVM native image (run 37224559029; logs are in the artifact
|
b-re-w
added a commit
that referenced
this pull request
Oct 4, 2026
… over the parity harness Stacked on #165. The window code is the fork's now; the Compose half of what #147 and #155 added is not, and was on neither develop nor #165. - macOS Kotlin/Native: contentMinimum, DockIcon (with ImageBitmap.toNSImage), SystemDarkMonitor fed by the appearance notification, and the fork's MacosClipboard and MacosClipboardManager, so Paste is offered by what the pasteboard holds. - GraalVM macOS: the same DockIcon, contentMinimum and a polled SystemDarkMonitor, the clipboard through TextPasteboard, window options read once by NativeWindowOptions, and the synthetic exit. - The K/N-portable LatencyTrace and SyntheticInput (no String.format, System.nanoTime shim, exit after the resize), the JvmCompatShims they need, and ParityMeasurementTest. - The hand-check app and its consumer fixture changes. Not here, with reasons: NativeWindowShell, the Win32 letter and digit keys and the default window switches depend on #134 (beginNativeWindowDrag, win32ComposeKey, the X11 and Win32 defaults, also #160, #170, #172) and come with it. The GraalVM text menu needs the fork's setTextMenu, which is not in the pinned fork commit yet. The resize header counter on Kotlin/Native is dropped: the fork's FramePresentLog replaces it. Covers FR-33.6 (clipboard and text menu enablement), FR-19 (min size, Dock icon), NFR-14.
The same win32_window.c as feat/win32-resize-kn (602e454): resize frames drawn by Skia raster into a DIB and blitted with GDI, for a renderer that opts in. The native image renderer does not opt in yet, so its frames are unchanged.
Same win32_window.c as feat/win32-resize-kn (c0ab754): dxc_native_context_menu takes the macOS window's packed entries and answers the chosen index or -1 (FR-33.1).
The GraalVM Win32 window opts into the raster resize path the C side already has: while the size changes, the same scene renders into a raster Skia surface over the window's DIB (BGRA, premultiplied, sRGB, RGB subpixel order) and is blitted in before WM_SIZE returns. DXC_RASTER_RESIZE=0 keeps resize frames on the GPU. GcExperiment also reports process memory at each phase where the window can.
build-native-windows.ps1 set no heap options, so Substrate VM sized the heap from physical memory. Same -R:MaxHeapSize=64m, MaxHeapFree=4m and young generation share as build-native.sh.
test-resize-gc.yml gains a Windows job: it builds the native image and runs the scripted resize with the built-in 64 MB cap, with -Xmx0 and with -Xmx2g, logging process memory, GC and the CPU resize frames.
Same win32_window.c as feat/win32-resize-kn (4ea210f): CPU resize frames presented through a GDI compatible B8G8R8A8 swapchain, the on-screen capture and hit-test checks, and the debug hooks they use. The native image's Skia target follows the BGRA format (done earlier on this branch).
Same win32_window.c as feat/win32-resize-kn (5cb71aa).
b-re-w
added a commit
that referenced
this pull request
Oct 17, 2026
Carried from #170 (173bd7a), without its GC experiment hooks: the GraalVM Win32 window opts into the raster resize path in win32_window.c, the same one the Kotlin/Native renderer uses. While the size changes the scene renders into a raster Skia surface over the window's DIB (BGRA, premultiplied, sRGB, RGB subpixel order) and is copied in before WM_SIZE returns. DXC_RASTER_RESIZE=0 keeps resize frames on the GPU.
b-re-w
added a commit
that referenced
this pull request
Oct 17, 2026
…n32 frame loop Carried from #170 (047c643), with LatencyTrace.kt and SyntheticInput.kt from feat/win-linux-window-default (4183ef2), which the wiring needs: DXC_REPORT_LATENCY marks for the loop turn, the window's own events and each drawn frame, and DXC_SYNTH's type and click modes. Its resize and keys modes are left unwired, as they were there.
Member
Author
|
Handoff (2026-10-25): Branch: feat/win32-resize-sync. State: draft; GraalVM smoke test fails on Linux arm64, Linux x64 and macOS arm64. Next: needs owner/leader triage. Blocked on: owner/leader triage. |
This was referenced Oct 25, 2026
b-re-w
added a commit
that referenced
this pull request
Oct 26, 2026
Member
Author
|
Closed during the 2026-11-07 branch consolidation (integrated via #505 or superseded). Branch kept. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Win32 live resize design from #164 in steps, each a separate commit that compiles in the "Windows C compile" job. Nothing here is verified on hardware yet; only captures can say whether the resize is fixed.
Steps
dxc_native_debug_resize/dxc_native_debug_key(CI compile green, awaiting captures)How to verify each step
Common capture setup for every step (DESIGN.md section 4): solid magenta wallpaper; a sample with a 1 px edge marker exactly at the client edge, corner squares, and a grid anchored to the right and bottom edges; full-screen capture at or above the panel refresh rate, every frame kept. Run at 100% and 200%; drag each edge and each corner; slow (~100 px/s) and fast (~2000 px/s flicks); grow and shrink; maximise/restore and snap. Report frame numbers of failures with stills.
Step 1 (473f7ee, oversized composition swapchain + source size + clip; CI run 37215685679). Record the full matrix. Also note on stderr whether "the swapchain refused a source size" appears (if it does, this step fell back to per-step ResizeBuffers and the rest is not being exercised). Success over the baseline (c54ee64): no stretched frames at all (grid cell size constant in every frame), no garbage or stale pixels beyond the right/bottom edge marker (the clip), and a drag that keeps up with the cursor better because steps no longer reallocate. Not expected yet: magenta gaps at the growing edge can still appear, since the frame is still presented from WM_SIZE after the rectangle changed.
Step 2 (ebe31c6, present from WM_NCCALCSIZE and wait for the compositor; CI run 37215737260). Same matrix, same sample. Success over step 1: on grow, no magenta strip at the growing edge in any frame; the edge marker sits on the frame edge in every frame, including fast flicks and left/top edges. Note Windows 10 vs 11 if both are available (DwmFlush vs compositor clock). Expected remaining failure: on shrink, possible frames where the window is still larger than the content (magenta or empty strip inside the frame at the shrinking edge); that is what step 3 targets. Also check the drag rate stays at the refresh rate (no visible lag behind the cursor beyond one frame).
Step 3 (dc8d118, replaces 1b69d4f; shrink without stale pixels; CI run 37216054019). 1b69d4f held the old source size on shrink, which showed whatever the buffer last held between the new and old edge (a previous frame); dc8d118 removes that. Every frame now sets SetSourceSize and the visual clip to exactly what it drew, before its Present(0,0), and commits clip and present together, so no frame can show pixels it did not draw. On shrink, WM_NCCALCSIZE returns right after the commit without the compositor wait, so the commit and the smaller window rectangle are sent for the same compositor frame; on grow it still waits. One draw per step. Run with DXC_REPORT_LATENCY=1 and keep stderr: each step prints "resize step WxH grow|shrink took N ms". Record the full shrink set (each edge and corner inward, slow and fast, restore from maximised). Success over step 2: no magenta or empty strip and no stale content strip at a shrinking edge in any frame; edge marker at the frame edge in every frame. The residual risk is the race: if a frame shows magenta at the shrinking edge, the commit landed a tick before the rectangle. Grow must still pass as in step 2.
Stretch fix (82ece73, CI run 37217138992). The owner's check of bfa30e1 showed squashed content. Cause: CreateSwapChainForComposition requires DXGI_SCALING_STRETCH (its docs: "You must also specify the DXGI_SCALING_STRETCH value"), so the NONE attempt always fell back to STRETCH, without logging it. With STRETCH the source-size region is stretched over the whole buffer, and during a drag the buffer is the size of the work area, so drawing w x h came out magnified. The visual now gets a scale of shown/buffer and a clip of the buffer extent in each commit. To verify: run with DXC_REPORT_LATENCY=1 and keep stderr. Expect one "swapchain for composition, scaling STRETCH" line and "drawn WxH of buffer BxC, visual scale ..." lines during the drag. Record the full matrix at 100% and 200%. Success over bfa30e1: the grid cell size stays constant and the edge marker stays 1 px in every frame, while the window still keeps up with the drag. Leftover risk: SetSourceSize takes effect on Present but the scale takes effect on Commit, so if those land in different compositor frames, a single frame can come out scaled. Note any frame where only one step is stretched.
Exact-size refit (30edc5b, MSVC run 37217254061, Kotlin run 37217256463). This replaces the scale workaround in 82ece73 and the oversized buffer from step 1. A composition swap chain is always on DXGI_SCALING_STRETCH, which shows the image 1:1 only when the buffer is exactly the frame's size. Every resize step now does ResizeBuffers to exactly w x h, then draw, Present(0,0) and Commit, with the same wait policy (wait for the compositor on grow, no wait on shrink). No source size, no visual transform, no clip, so nothing can land on screen in a different frame from the content. To verify: run with DXC_REPORT_LATENCY=1 and keep stderr. Expect one "swapchain for composition, scaling STRETCH" line. Each step prints "resize step WxH grow|shrink took N ms (refit, draw, present, commit, wait)". Record the full matrix at 100% and 200%. Success over 82ece73: no stretched or squashed frame at all (constant grid cell size, 1 px edge marker) in any frame, including fast flicks. Also note the per-step ms, because a slower drag is the expected cost of refitting every step.
Flutter-style resize (d3c7eb1 plus signature fix fe82373; MSVC run 37217731620, Kotlin run 37217633971). This replaces the DirectComposition path entirely. win32_dcomp.cpp/.h are deleted; no backdrop material on Win32 used them. Now: a flip-model HWND swap chain with DXGI_SCALING_NONE, with the redirection surface kept. WM_NCCALCSIZE only adjusts the caption. In WM_SIZE, before it returns: ResizeBuffers to exactly w x h, draw, Present(0,0), then DwmFlush when DWM composition is on. A frame presents only if it was drawn at the size WM_SIZE recorded, and only once per size. The step is capped at 100 ms: DwmFlush is skipped past the cap and a "hit the 100 ms cap" line is logged. WM_PAINT draws only when no resize is in flight. To verify: run with DXC_REPORT_LATENCY=1 and keep stderr. Expect "swapchain for the window (flip model, redirection surface kept), scaling NONE" once, then per step "resize step WxH presented, flushed, took N ms". Record the full matrix at 100% and 200%, every edge and corner, slow and fast, grow and shrink, maximise/restore and snap. Success over 30edc5b: no stretched frame, and no magenta gap on grow or on shrink. What can still appear, and must be noted: for a moment, the previous frame unscaled at the top left, with the redirection surface showing at the new edge on grow. Count those frames. Any "not presented" or cap lines are failures to investigate.
Grow presented before the window grows (0415d30 + a201057; MSVC 37218919140, Kotlin 37218914929). In fe82373's capture, frames 69 to 71 showed black at the right and bottom edges during a diagonal grow. Every step there logged "presented, flushed", so a WM_SIZE present comes too late: the window and its redirection surface have already grown, and the new area is cleared to black. 0415d30 never skips the DwmFlush any more (the cap is only logged) and splits each step's time. a201057 handles grow in WM_NCCALCSIZE, before the rectangle changes: ResizeBuffers to the new client size, draw, Present(0,0), DwmFlush. With DXGI_SCALING_NONE the larger buffer is shown unscaled at the top left and cut by the old window. Shrink stays in WM_SIZE. To verify: run with DXC_REPORT_LATENCY=1 and record the same matrix, especially fast diagonal grows, maximise and snap at 200%. Success over fe82373: no black or magenta at a growing edge in any frame. Per-step stderr lines read "gpu idle / refit / draw / present / DwmFlush", plus a Kotlin line per frame "surface / layout and draw / flush and GPU". Send these for any step over 16 ms, and in particular the maximise step that took 148 ms.
Copy model swap chain, as Flutter does (5d86825; MSVC 37219515706, Kotlin 37219513496). This replaces a201057 and the flip-model path. Skia stays on Direct3D 12 and draws into its own texture. Each frame that texture is copied through D3D11On12 into a Direct3D 11 swap chain on the window, set up the way ANGLE sets up Flutter's: DXGI_SWAP_EFFECT_SEQUENTIAL (copy model), 1 buffer, DXGI_SCALING_STRETCH. Present copies into the window's own redirection surface, which DWM resizes together with the window. Resizing happens only in WM_SIZE: refit to exactly w x h, draw, copy, Present(0,0), DwmFlush, then return. WM_NCCALCSIZE is back to the caption adjustment only. No background brush and no fill. Cost: one extra GPU copy per frame. To verify: run with DXC_REPORT_LATENCY=1. Expect "swapchain for the window, copy model (sequential), 1 buffer, STRETCH" once at startup. Each step logs "gpu idle / refit / draw / copy / present / DwmFlush", and the Kotlin side logs one line per frame. Record the full matrix, especially fast diagonal grows, maximise and snap at 200%. Success over fe82373 and a201057: no black or magenta at any growing edge in any frame, and no stretch. Also report the copy ms at 2880x1704 and any "hit the 100 ms cap" lines, with their sub-step split.
Resize diagnostic (7d644b9; Kotlin 37220886325). Off by default. With DXC_RESIZE_DIAG=1 each frame is filled cyan before the scene draws. In a capture, cyan at a growing edge means the content was late; black means the present was late or missing. Record one grow and one maximise with it set, and the same again with it unset.
Faster steps (a9e7c1d; MSVC 37221171651, Kotlin 37221167524). The draw texture and its D3D11On12 wrapper are kept across resizes. They grow only when too small, and then to at least the monitor size, rounded up to 256. Only the drawn region is copied into the swap chain. The full GPU wait after every present is gone; the barrier list's allocator now waits on a fence for that list only. To verify: the same matrix with DXC_REPORT_LATENCY=1, plus DXC_RESIZE_DIAG=1 for one grow and one maximise. Expect refit to be just ResizeBuffers (no texture creation except the first time a drag grows it), and lower per-step totals than 5d86825. Black or transparent areas at a growing edge should become rarer or disappear. Any that remain, send with the step lines around them. Also check that the content is not offset or cut off: Skia now draws into a larger texture.
State logging, two fixes, priorities (27bdda5 logging, de3872e and 297055c fixes, d291f00 priorities; MSVC 37221558226, Kotlin 37221555746). Lines starting 'compose-rust: resize-mode:' are now on by default. They cover: size-move on/off, window maximised/minimised/restored, dpi, draw texture growth, failed ResizeBuffers/GetBuffer/Present with the device-removed reason, and every skipped present with its reason. Fixes: WM_PAINT outside a drag redraws, so a lost redirection surface no longer stays black. A frame Skia made no surface for is no longer ended with an invalid barrier. Priorities, logged at startup with 'resize priority:': the drag thread runs above normal and the D3D12 queue is high priority by default; DXC_RESIZE_PRIORITY=0 turns both off, =1 adds GPU thread priority +5. To verify: reproduce the good-then-broken sequence with stderr kept, and send every resize-mode line around the moment it breaks. Then compare a drag with DXC_RESIZE_PRIORITY=0 against the default while builds are running.
Monitor move (5e040e0 logging, plus fixes in the next two commits; head bbade86; MSVC 37221783914, Kotlin 37221780007). At startup and on each WM_DPICHANGED, WM_DISPLAYCHANGE and monitor change, stderr gets a 'resize-mode: monitor ... dpi ..., monitor adapter LUID, device adapter LUID (same/DIFFERENT adapter)' line. Fixes: WM_DPICHANGED now applies the suggested rectangle with SetWindowPos, so a DPI change goes through WM_SIZE's draw, present and flush. The maximised overhang is measured at the window's own DPI. To verify, repeat the owner's sequence: main display, then secondary, then back to main, resizing at each stage. Record it, and send every resize-mode line. In particular: do the two displays report different adapters, and do the DPI values differ? Success is that resizing stays clean after the window comes back to the main display.
Debug hooks (7889437, dxc_native_debug_resize / dxc_native_debug_key; CI run 37215854860). Run a sample with DXC_SYNTH=resize (and DXC_SYNTH=type,keys with DXC_SYNTH_KEYS=abc). Expected: six seconds in, the window shrinks from its size to 360x420 points in 60 steps with ~8 ms between steps, top left held, framed by WM_ENTERSIZEMOVE/WM_EXITSIZEMOVE; the typed letters reach the focused field. Record the scripted resize with the same capture setup, as a repeatable version of the slow shrink case.
Head for recording: bbade86. Cost note: the copy model path adds one GPU copy of each frame (D3D12 texture into the D3D11 swap chain buffer). Everything DirectComposition-based above (steps 1 to 3, 82ece73, 30edc5b) is superseded by the Flutter-style path.
Not done / known gaps