fix(startup): hide the taskbar proxy too, and trace the --tray timeline

The window still showed, taskbar entry included. Two things.

The taskbar button belongs to the FMX proxy window (TFMAppClass), a separate
top-level window from the form — hiding the form alone never removed it.
FindFMXAppWindow moves from private to public so the activate-hide can drop
both. (Guarded on Assigned(FBridge): the handler is installed at line 222,
the bridge is created at 268.)

And rather than guess a fourth time at FMX's startup order — the same trap as
the window-state saga, which only fell to instrumentation — this logs a
millisecond timeline: FormCreate begin/end, the activate-hide, and the
deferred MinimizeToTray. Whichever gap holds the second will be obvious.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-27 10:47:25 +01:00
parent eec7bc4f80
commit 0506d757dd
2 changed files with 18 additions and 3 deletions
+4 -1
View File
@@ -140,8 +140,11 @@ type
procedure PrepareNid;
procedure ShowTrayMenu;
procedure ShowFirstTimeBalloon;
function FindFMXAppWindow: HWND;
public
// The FMX taskbar proxy (TFMAppClass) — a SEPARATE top-level window from
// the form, and the one that owns the taskbar entry. Public so the host
// can hide it during a --tray launch, before MinimizeToTray gets to run.
function FindFMXAppWindow: HWND;
// Tray balloon (caller applies its own gating setting). Used for
// messages the user must see while the window is hidden — e.g. an
// autofill blocked by an elevated target.