mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-28 16:58:41 +01:00
The overlay window was a plain Win32Window, which never passes messages to the sub-engine's plugins. window_manager therefore never reported a move (nothing was saved, so the overlay always reopened at its default spot) or the close button (the window was destroyed under a running engine, and the main window still thought the overlay was showing). The overlay now has its own window class that offers each message to HandleTopLevelWindowProc first, as FlutterWindow does. Its close button hides the window; the overlay's Dart saves the position, tells the main window, then asks for the window to be closed, which the runner does from the message loop rather than from inside that engine's own handler. A window's id comes from its HWND (what window_manager's getId returns) instead of the last setWindowId call, which could arrive before the window was listed. Closing the same window twice is a no-op, and a window no longer hands messages to a destroyed controller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>