Commit Graph

1 Commits

Author SHA1 Message Date
Jonas Bark
29a267eba4 overlay/macos: vendor multi_window_native and make sub-windows NSPanels
Forked the upstream package
(https://github.com/Swatimishra8/multi_window_native) into
packages/multi_window_native and pinned pubspec to the path dep.

Key macOS change in the vendored plugin's createNewWindow:
- NSPanel instead of NSWindow with styleMask = [.titled, .closable,
  .resizable, .nonactivatingPanel, .utilityWindow].
- isFloatingPanel = true, becomesKeyOnlyIfNeeded = true,
  hidesOnDeactivate = false.
- level = .screenSaver (highest standard user-space level).
- collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary,
  .stationary, .ignoresCycle].
- Initial size dropped from 1440x900 / minSize 800x900 to 220x140 /
  minSize 160x80 (closer to what the trainer overlay needs).

With those properties set at construction time, the sub-window sits
above fullscreened trainer apps from the moment it's shown — no more
retry loop chasing the window after the fact.

MainFlutterWindow.swift's onEngineCreatedCallback no longer needs the
elevation retry; it just calls RegisterGeneratedPlugins on the new
engine and leaves the window-level work to the plugin.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:18:58 +02:00