8204ccb316
The previous version over-corrected: a normal window came back maximised after Win+D. Two causes, both fixed. - It read FMX's WindowState, which does not reliably follow a native un-maximise, so FWantMaximized never cleared. Now reads Win32 IsZoomed / IsIconic, which is the actual truth. - The restore fires its own resize, reporting whatever FMX decided — recording that erased the very intent we were preserving. FWasMinimized now gates the restore's resize out of the tracking. Activate then corrects both directions: re-maximise when FMX dropped a maximised window, restore when Windows brought a normal one back maximised. Degrades safely — if the minimise resize never fires, it simply does nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>