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
On Windows only, toggling Window.isFullScreen updates the native window bounds, but the Flutter content / surface often does not resize or repaint until the window loses and regains focus (e.g. Alt+Tab). Exit fullscreen has a related failure: the window restores its previous size, but the client area (the windows content) stays as big as in fullscreen (so it's overflowing the windows) and the system title bar reappears in a classic / Windows-7-like style, even though the app uses a hidden title bar + custom chrome. Alt+Tab again “fixes” the layout and chrome.
macOS / Linux are fine in our usage. Package version: nativeapi / nativeapi_flutter 0.6.2 (latest on pub.dev).
Stale child FLUTTERVIEW client size & missing repaint on fullscreen transitions:
On Windows, Window::SetFullScreen strips/restores WS_CAPTION | WS_THICKFRAME via SetWindowLongPtrW and updates window geometry via SetWindowPos(..., SWP_FRAMECHANGED) / SetWindowPlacement.
When the outer WindowRect already matched the monitor size or only the non-client frame insets changed during SWP_FRAMECHANGED, Win32 did not reliably deliver a follow-up WM_SIZE with the final post-frame-change GetClientRect to Flutter's Win32Window host, leaving the child FLUTTERVIEW surface unsized/unrepainted until a focus change (Alt+Tab).
Classic Aero Basic title bar / border flash on exiting fullscreen (TitleBarStyle::Hidden):
While a window covers monitor.rcMonitor, dwm.exe detaches non-client rendering (WM_DWMNCRENDERINGCHANGED with wParam = 0). Upon SetFullScreen(false), DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) flips back to TRUE in user mode before dwm.exe asynchronously re-attaches (WM_DWMNCRENDERINGCHANGED with wParam = 1), causing DefWindowProcW(WM_NCPAINT) to briefly paint a classic Aero Basic caption/border into the window's redirection surface.
Fix
Synchronize the host client area (WM_SIZE with final GetClientRect + immediate RedrawWindow) at the end of SetFullScreen(true) and SetFullScreen(false), and restore WINDOWPLACEMENT before SWP_FRAMECHANGED when leaving fullscreen.
Track actual DWM non-client attachment via WM_DWMNCRENDERINGCHANGED, suppress classic UAH caption/frame messages (WM_NCUAHDRAWCAPTION / WM_NCUAHDRAWFRAME) on TitleBarStyle::Hidden windows, preserve the top client band across DefSubclassProc(WM_NCPAINT) while DWM non-client rendering is detached, and clear non-client border residue (WindowRect - ClientRect) once DWM re-attaches while preserving Windows 11 rounded corners and shadow.
Activity
Merge pull request #66 from libnativeapi/fix/issue-60
lijy91 commentedon Dec 1, 2026
Fixed in libnativeapi/nativeapi-core#105 and #66.
Root Cause
Fix