ca54c39c75
The log settled the previous attempt: WPF_RESTORETOMAXIMIZED (flags=2) is set for ANY maximised window, not just one on its way back from minimised, and showCmd is already 1/3 by the time the resize fires. Testing those classified the user's own Maximize click as a restore, so the intent was never recorded (want stayed False) and nothing could be re-applied afterwards. Windows exposes no restore marker here. What does separate the two: a user gesture happens while the window OWNS THE FOREGROUND; FMX's re-layout during a restore (and during the startup burst) runs before it does. Resizes that arrive without foreground ownership are no longer recorded as intent, and re-apply a maximised state the user had left. Placement is still read, for the log only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>