feat(record): read what Windows says about each window by default

--probe-windows was off unless asked for, so a recording made on Windows without
it could not say whether a window komorebi has in front is really on screen, and
had no ghost tiles to find: the most useful thing a Windows recording holds was
the one a person had to know to switch on.

On Windows record now probes each window event by default, and --no-probe-windows
turns it off. RecordArgs::probes_windows is the one place that decides, so the
command line and the recorder window (which takes RecordArgs::default) agree.
Elsewhere it stays off, because there is nothing to read: asking for
--probe-windows outright on a Mac is still an error, as it was, and the two flags
together are refused by clap on any host.

Checked on this Windows machine: a recording with no flag has a probe on 47 of
its 52 events, and with --no-probe-windows none of its 58.

The docs and help text say so, and a doc comment that said a Mac recording has no
ghost tiles is corrected: it has them, from the frames komorebi read.
This commit is contained in:
LGUG2Z committed 2026-10-28 16:24:29 -07:00
1 parent 93a024f0f1
commit c239607af9
8 files changed
+77 -16

No files matched your search

+2 -1
View File
@@ -71,7 +71,8 @@ enough to leave the application's other windows alone:
The entry is put where it sorts and the rest of the file is unchanged, line for line.
What counts as a ghost tile depends on what the recording can say. On Windows it needs `record --probe-windows` (see
What counts as a ghost tile depends on what the recording can say. On Windows it needs the window probes that `record` takes by
default (see
[Probing windows on Windows](recording-a-bug-repro.md#probing-windows-on-windows)): Windows says whether each window is
on screen, and a ghost is one it said was cloaked or not visible on every read and never on screen. A Mac cannot be
asked, so there it is a window whose frame, as komorebi read it from the accessibility API, was never one a person
+5 -4
View File
@@ -92,7 +92,7 @@ Useful options:
| `--oslog-all` | One extra unfiltered system-wide stream (very large) |
| `--no-oslog`, `--no-komorebi` | Skip the OS trace, or skip touching komorebi entirely |
| `--no-video` | Do not capture the screen; record everything else on the same clock (see below) |
| `--probe-windows` | Windows: after each window event, record what Windows says about that window (see below) |
| `--no-probe-windows` | Windows: do not record what Windows says about each window event, which is on by default (see below) |
| `--fps N`, `--retina`, `--codec hevc\|h264` | Video settings (30 fps cap, logical points, HEVC by default) |
### Marking where the bug is
@@ -116,14 +116,15 @@ started, and there is nothing for `frames` to show.
### Probing windows on Windows
komorebi for Windows hides a window by _cloaking_ it where it is, so its state cannot show whether a
window is really hidden. `record --probe-windows` follows each window event with a read of the
window is really hidden. So on Windows `record` follows each window event with a read of the
window's real state from Windows (visible, cloaked, minimized, where it is) and, now and then, asks
komorebi whether it manages the window and which rules matched. `overview` then compares the two:
a window komorebi shows that Windows has hidden, one it hides that Windows shows, and a visible
window it does not manage (usually correct, with komorebi's explanation). It costs a few system
calls per event and a query to komorebi the first time a window is seen, and it reads nothing but
those facts. It does nothing on a Mac, where a hidden window is parked in a corner and the state
says so.
those facts. `--no-probe-windows` turns it off, and without it `overview` cannot say whether a window is
really hidden, nor find a ghost tile. It does nothing on a Mac, where a hidden window is parked in a
corner and the state says so, and asking for `--probe-windows` there is an error.
### Checking your setup