6bed75f49e
Win+D / Show desktop minimises the window without any tray transition, so the restore took the non-tray branch. FMainForm.Show runs first there and re-applies FMX's own WindowState (normal), discarding the WPF_RESTORETOMAXIMIZED flag Windows had recorded — the app returned in normal size. Read the placement flag BEFORE showing, and re-apply SW_SHOWMAXIMIZED when it was set. The tray path is untouched: it already replays its own captured placement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>