pub unsafe fn record_intentional_focus(child: *mut c_void)Expand description
Single write helper called from both intentional-focus sites (the
pane subclass in this module and MainFocusReclaimTask in
ui_tasks.rs). Resolves child’s top-level ancestor via
GetAncestor(GA_ROOT) and stores the pair into LAST_FOCUSED_BY_ROOT.
Safety: child must be a live HWND that the caller intentionally
just focused (so the recorded value is meaningful). Caller must
also be on the Win32 UI thread, since GetAncestor and the static
LazyLock aren’t sensitive to thread but Win32 idiom is to keep
HWND traffic on the message-pump thread.