You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: Window::Hide()/Show() play AppKit's fade-and-shrink animation #82
On macOS, Window::Hide() calls orderOut:, and AppKit plays its fade-and-shrink animation for document windows (NSWindow.animationBehavior == .default). Showing can animate in the same way.
For a region screenshot the app hides its own window, captures the display, then shows a full-display overlay. The animation is visible: we recorded it at 60 fps and saw several frames of the window shrinking and fading before the overlay appears. It can also leave a ghost of the window in the captured frame if the capture starts too early. Electron's hide() is instant, as is Window::Hide() on Windows.
The Flutter screen-capture example (PR #75) works around it in MainFlutterWindow.swift with a hideForCapture method channel. Before hiding, it sets animationBehavior = .none and sets alphaValue = 0 inside a CATransaction with actions disabled. When the window comes back, it restores the original animationBehavior.
Proposal
Pick one direction:
Make Hide() / Show() / ShowInactive() instant on macOS: no AppKit window animation, matching the other platforms. This changes current behaviour; note it in the CHANGELOG.
Add an explicit toggle, e.g. void Window::SetAnimationsEnabled(bool is_enabled) / bool AreAnimationsEnabled() const. On macOS it maps to NSWindowAnimationBehaviorNone / Default; on Windows to DWMWA_TRANSITIONS_FORCEDISABLED; elsewhere it is recorded only.
Option 1 is simpler and matches what users expect from Hide(); option 2 keeps today's default.
Acceptance
From Dart, window.hide() removes the window from screen within one frame on macOS: no fade or shrink frames in a 60 fps recording. This must work without a custom MainFlutterWindow.swift.
Activity