the probes
one os behaviour each, proven on real hardware
mirrored from
window/cpp/probes/README.md, which is the only copy of this text. edits made here are overwritten the next time the site builds
the smallest standalone programs that answer the gates in plan/PLAN.window-cpp.md. none of
this is library code n none of it gets ported, a gate probe exists to turn a gate into a yes or a
no n is then thrown away
TWO files in here are not gate probes n are not thrown away, n both get rerun every time the
thing under them moves. they sit here bc they want exactly what a probe wants, a cl.exe line n no
project, n each says so at the top of itself
abi-smoke.c, the c abis done criteria walked,build-abi-smoke.bat, its section is at the bottomtools-smoke.c, P1.41s inspection surface,build-tools-smoke.bat. it linkswindow.abi.tools.libn neverwindow.abi.lib, which is the whole reason it is its own file rather than more checks in the other one. the tools names do not exist on the shipping dll at all, so a probe that could reach both would be proving the opposite of what the split claims. it has two halves with a fixed count each, the default run is 44 checks n is headless, no window n no pump, so it still runs over ssh n in a container, ntools-smoke --liveis another 44 against a real chromed window, which is the only place the frame stamp, the two pngs n the event tail can be driven end to end. they are kept apart on purpose, folding the windowed ones in would cost every caller the headless run
each file is fully self contained n carries its own build line in the comment at the top, one
cl.exe invocation with its libs. no vcxproj, no sln, no cmake
| probe | gate | needs a desktop |
|---|---|---|
g-window-3-clickthrough.cpp | G-window-3, per-pixel click-through on a layered window | yes |
g-window-7-partial-present.cpp | G-window-7, does a partial layered present land | yes |
g-window-2-dwrite-resolve.cpp | G-window-2, does dwrite give a file path n face index | no |
g-window-4-dcomp-alpha.cpp | G-window-4, premultiplied alpha on a composition swapchain | yes |
g-window-dpi-probe.cpp | none, P1.33 groundwork, what this box reports for dpi | no |
building them
open an x64 native tools prompt for vs2022 n run the line from the top of the file. all four at once, from this folder
cl /std:c++20 /EHsc /W4 /nologo /Fe:g-window-3.exe g-window-3-clickthrough.cpp /link user32.lib gdi32.lib
cl /std:c++20 /EHsc /W4 /nologo /Fe:g-window-7.exe g-window-7-partial-present.cpp /link user32.lib gdi32.lib dwmapi.lib
cl /std:c++20 /EHsc /W4 /nologo /Fe:g-window-2.exe g-window-2-dwrite-resolve.cpp /link dwrite.lib ole32.lib
cl /std:c++20 /EHsc /W4 /nologo /Fe:g-window-4.exe g-window-4-dcomp-alpha.cpp /link user32.lib gdi32.lib d3d11.lib dxgi.lib dcomp.lib
cl /std:c++20 /EHsc /W4 /nologo /Fe:g-window-dpi.exe g-window-dpi-probe.cpp /link user32.lib shcore.libthey all build clean at /W4 against the 10.0.26100 sdk. three of them put a window on screen so
they have to be run from your own desktop, not over ssh n not from an agent session
set TEMP n TMP to a scratch dir first if you are running these from an agent session, else
cl.exe cannot write its intermediates n dies C1083 ... Permission denied then D8040, which
reads as a wiring fault n is not one. cppuild.bat does the same for the solution
G-window-3, per-pixel click-through
the question, does a layered window presented with UpdateLayeredWindow n AC_SRC_ALPHA
still get the free os per-pixel click-through from c++, i.e. does a click on a fully transparent
pixel reach the window behind
why it matters, this is the load bearing argument for keeping ULW as the default present path.
the plan says dcomp does not get this for free n wed have to read our own alpha buffer in
WM_NCHITTEST to win it back. if ULW does not give it either then that argument evaporates n the
present path fork wants reopening
run it, g-window-3.exe, then click inside each of the three bands n read the console
two windows sit at exactly the same screen rect. the BACK one is opaque n green with a grid, the FRONT one is layered n split into three vertical bands of differing alpha. every click prints which of the two windows the os handed it to
| band | alpha | what it tests |
|---|---|---|
| A | 0 | fully transparent, the actual gate |
| B | 1 | near invisible, tells us where the os threshold sits |
| C | 255 | solid, the control |
each band has a solid 3px outline n an opaque tag, bc a band at alpha 0 or 1 is invisible by definition n you still need something to aim inside of. click the interior, not the outline n not the header strip
pass
BACK got the click at (110, 180) band A alpha 0
FRONT got the click at (555, 180) band C alpha 255band A lands on BACK n band C lands on FRONT. a yellow cross appears on the back window wherever it took a click, so the pass is visible as well as logged
fail, band A lands on FRONT. that means the transparent pixels are still eating clicks n the free hit test is not there
band B is bonus rather than gate, it says whether the threshold is alpha == 0 exactly or a
range. worth knowing before P1.14 draws a bar with soft edges, bc a nearly transparent edge pixel
that still eats clicks is a real ux problem
note, WS_EX_TRANSPARENT is deliberately not set anywhere in this probe. that flag makes a
whole window click through regardless of its pixels n would prove nothing about per-pixel alpha
G-window-7, the partial layered present
the question, does a partial layered present actually land on a real desktop
why it matters, the ahk lib has this switched off at gui/window.ahk:202
static partial_present := false, with the note that it lags hard n updates dont land against a
real compositor, n that the harness it was proven on had no dwm so a present return code proved
nothing visually. so UpdateLayeredWindowIndirect with a prcDirty is unproven, not merely
unwritten, n P1.12 must not assume it
the design point, this probe never trusts a return code. stage 2 writes two changes into
the backbuffer n marks only one of them dirty, a green block inside prcDirty n a red block
outside it. that splits the three possible outcomes apart by eye, which a return code cannot do
run it, g-window-7.exe, then type the keys into the console not the window
| key | what it does |
|---|---|
1 | reset to the base image with a full present |
2 | the dirty test, pptDst n psize left null, the way the ahk lib did it |
3 | the dirty test again but with pptDst n psize supplied |
4 | slide a bar across using partial presents only, timed |
5 | the same slide using full presents, the control |
f | force a full present of whatever is in the backbuffer right now |
q | quit |
the startup line prints whether dwm composition is on. if it says OFF then stop, the results mean nothing n thats exactly the trap the ahk measurement fell into
reading stage 2 n 3
| what you see | what it means |
|---|---|
| green only | PASS, the present landed n it was genuinely partial |
| neither block | FAIL, the update did not land, the ahk symptom reproduced |
| green and red | the call quietly did a full present, nothing is broken but theres no bandwidth saving to be had |
then press f. a forced full present must show both blocks. that separates a present problem
from a drawing problem, if f shows nothing then the bug is upstream of the present n the stage
proved nothing
run 2 and 3. the only real variable here is whether pptDst n psize ride along with the
dirty rect, the ahk lib left both null (gui/renderer-b2d.ahk:785) n that is the version that
never landed, so the probe runs it both ways rather than guessing which one mattered. if 3
passes n 2 fails, thats the whole answer n P1.12 just supplies them
reading stage 4 n 5
run 4 then 5 n compare, thats the lags hard claim tested directly
[4] PARTIAL present anim, 240 frames
present cost min 0.041 ms avg 0.083 ms max 0.512 ms
wall time 2410 ms for 240 framespass, the bar slides smoothly, leaves no trail behind it, n the partial numbers are at or below the full ones. fail, the bar stutters, smears a trail, or partial comes out slower than full, which is the lags hard report reproduced n means the fast path is slower than the slow path
if it fails, the plan already handles it. the partial repaint still stands n only the partial present falls back, so P1.12 keeps the repaint saving whatever the compositor does
G-window-2, dwrite font resolution
the question, does dwrite return a real file path n face index for a variable fonts named
instance n for a .ttc member, on Anthropic Sans Medium Text n Cambria Math, the two that
broke the ahk resolver
why it matters, blend2d only ever sees font files, so ahk hand rolled a family name resolver out of two registry keys n that one piece produced four of the five bugs the 2026-08-09 sweep found. if dwrite hands us a path plus a face index then the whole bug class disappears n P1.8 is a thin wrapper
run it, g-window-2.exe, no desktop needed. args are font names, or a path to a .ttf .otf
.ttc to go straight at the file. no args runs both gate names plus the anthropic file if its
installed
g-window-2.exe
g-window-2.exe "Segoe UI" "Cascadia Code"
g-window-2.exe "C:\Windows\Fonts\cambria.ttc"each name is run three ways, against the modern font set (every property in turn), against the classic weight-stretch-style collection for contrast, n if nothing matches, a near miss scan on the first word so a zero result is not ambiguous between not installed n filed under another name
this one has already been run n it passes, with a sting
Cambria Math resolves cleanly
full name Cambria Math
file C:\WINDOWS\FONTS\CAMBRIA.TTC
face index 1face index 1, not 0. index 0 would be plain Cambria n that is exactly the ahk bug, so the
.ttc half of the gate is answered yes
Anthropic Sans Medium Text resolves too, but only through the file, where it comes back as
a named instance of AnthropicSans-Romans.ttf at face index 0 with 5 axes pinned, wght 500
opsz 16 ital 0 wdth 100 slnt 0. so the variable half is answered yes as well
the sting, that font is installed per-user
(%LOCALAPPDATA%\Microsoft\Windows\Fonts) n it is absent from the dwrite system font set
entirely. every name lookup against the system set returns 0 matches, n so does
FindFamilyName. the file route finds all 12 named instances without trouble
so P1.8 cannot be name lookup alone. it needs the file route beside it,
IDWriteFactory5::CreateFontSetBuilder plus AddFontFile on a path, or a per-user font set built
explicitly. thats a real amendment to P1.8 rather than a gate failure, the gate itself passes
G-window-4, dcomp premultiplied alpha
the question, does a composition swapchain on a WS_EX_NOREDIRECTIONBITMAP window show
correct premultiplied alpha against a moving background, before any of phase 4 is written
why it matters, the plan claims every present path is zero conversion bc blend2ds native
format is premultiplied argb32 n thats exactly what DXGI_ALPHA_MODE_PREMULTIPLIED wants. if the
swapchain does not honour it then P1.16 has a conversion pass in it that nobody costed
run it, g-window-4.exe, esc quits
a BACK window scrolls hard edged stripes so theres real movement to blend against, n the FRONT dcomp window draws the same soft edged disc twice side by side. the left one is premultiplied correctly n the right one is left as straight alpha. one disc on its own proves nothing, you cannot eyeball a blend without something to compare it against
hard edged stripes rather than a gradient, on purpose, a bad blend shows up on a hard edge in a way it never does on a smooth one
the pixels take the same route the real lib will, a top-down premultiplied dib uploaded into a dynamic texture n copied to the back buffer, no shader n no d2d, bc the whole point of the seam is that the draw layer only ever produces a pointer n a stride
| what you see | what it means |
|---|---|
| LEFT clean, RIGHT washed out or haloed | PASS, premultiplied is honoured |
| LEFT dark or muddy, RIGHT clean | FAIL, its treating the data as straight alpha |
| an opaque box with no blend at all | FAIL, the alpha channel is being ignored |
| nothing visible | FAIL, the visual never reached the screen |
the console also prints the swapchain desc read back after creation. alpha mode 2 is
DXGI_ALPHA_MODE_PREMULTIPLIED, anything else there n the gate is lost before you even look at
the window
gates these probes do NOT cover
- G-window-1, blend2d builds clean x64 msvc n which version implements opentype variations, thats a build n a version question rather than a runtime one
- G-window-5, already closed 2026-08-13,
gui/renderer-b2d.ahk:451flush_text()is an empty body in the shipping code - G-window-6, the ahk v2 source hosting a static lib, only needed before phase 6 branches n it needs the interpreter source rather than a probe
the dpi probe, P1.33 groundwork
the question, three of them, n it is not a gate, it is the measurement P1.33 was written off
rather than assumed. what dpi is every monitor on this box really on, does the CALLING thread see
per-monitor v2 straight after SetProcessDpiAwarenessContext with no second call, n does a window
placed at a negative x land on the monitor those coords are on
why it matters, dpi.h leans on all three n a wrong guess on any of them is silent. the second
one especially, what it found is that a second SetProcessDpiAwarenessContext returns FALSE with
ERROR_ACCESS_DENIED while the context is still perfectly v2, so a declare_dpi_v2 that handed
that bool back would report a failure on every host after the first
what it answered, 2026-08-26
- three 1920x1080 monitors, all of them at 96 dpi, virtual screen
-1920,0 5760x1080, i.e. there is no second scale on this box to drag a window between, so P1.33s drag criterion is driven by the message in the runner n not by a person, n the runner says so out loud - the calling thread reads back
per_monitor_v2immediately, no extra call needed - a window created at
-1600,200lands on the-1920monitor,MonitorFromWindownMonitorFromPointagree MulDivrounds to nearest,101 * 150 / 96comes back 158 n not 157
the refusal behaviour is pinned by a check in the runner rather than only written down here, so a future windows that stops doing it trips a check instead of the workaround quietly outliving its reason
the abi smoke, P1.23, n this one is a keeper
the question, does the c abi hold up when it is called the way a DllCall calls it, i.e. from
plain c with no c++ in the translation unit at all
why it matters, abi/ is the only part of the lib whose whole job is to be reached from
outside c++, so a c++ check of it proves the wrong thing. abi-smoke.c is compiled as c, which
is what makes it worth having, it fails the moment something c++ shaped leaks into window_abi.h
why it lives here n not in window.test, window.test is an exe that links the static libs, n
this one has to go through the dll to be worth anything, a c caller reaching in the way a script
would. so it is a probe shaped job, one source n one cl.exe line, n it sits with the probes
run it, build-abi-smoke.bat, no desktop needed
it links bin\x64_Debug\window.abi.lib n the exe lands beside the dll in bin\x64_Debug\ so it
finds it with no path juggling, intermediates go to abi-smoke-out\. build the solution first,
cpp\build.bat Debug, n the bat says so rather than failing oddly when you have not
pass, every line reads ok, the last one says smoke passed n it exits 0
it comes in three parts. main is the script pumped window, version, desc, host, a column root
with a fixed child, the box that child got laid out into, theme set n read, a tween, a pump, a
paint, the event queue, then the teardown. walk_spawned is the P1.24 half n it is where the
thread claims actually get tested, one thread cannot prove anything about a second one
walk_controls is every gui_<control>_create there is, each one built, added to one column,
measured n laid out, then killed off by a single destroy on the parent. it also checks the refusals,
a style off the end of the enum, a negative tone, a zero max n an empty range all come back
gui_err_arg rather than defaulting quietly. only the controls carrying geometry of their own are
checked for a real box, a label or a button sizes off its TEXT n measuring text wants a font engine
a probe with no window has not got, so those read 0 in there n that is honest rather than broken
the spawned half stands up a message only window of its own to be woken at, exactly as an ahk script hands the abi its hwnd. it builds a tree HERE, spawns a window on a far thread with it, then starts a tween on this thread that the far thread ticks to completion on that one, so the done fires over there with nothing over here having asked for it. it proves the wake lands as a real message, the event drains carrying the right id, three events landing unwatched come back as three events n exactly one wake, n the affinity both ways, show, resize n pump refused off the windows thread while the tree still takes reads n writes from the caller mid flight
eight of the checks want a NO back n they are the interesting half, a theme destroy while a
control still points at it, a destroy of a root the host borrows, a destroy of a child the tree
owns, a call on a handle that has already died, a kind that was never turned on queueing nothing,
n a closed event that must be said once rather than once per pump. an ok back from any of those
is the failure, bc a stale handle sailing through is the exact thing the registry exists to stop
last run 2026-09-08, all 165 checks green against the project built dll, kid box 4 4 50 20
n alive 1, n green six runs out of six, which is the bar a threaded probe has to clear rather
than passing once