Skip to content

Windows: isFullScreen still leaves Flutter surface at wrong size after #60 / 0.6.3 (SyncFullScreenClientArea) #79

In review
libnativeapi/nativeapi-core
#114

Description

@MatteoMagnani7

Summary

Follow-up to #60 (fixed in nativeapi-core#105 / #66, shipped in 0.6.3).

On Windows only, toggling Window.isFullScreen still updates the native HWND bounds, but the Flutter / FLUTTERVIEW surface does not match that size and I cannot interact with the app in any way:

  1. Enter fullscreen: the window covers the monitor (black fills the rest of the screen), but the Flutter UI stays at the previous windowed size, centered, with large black margins around it.
  2. Exit fullscreen: the window frame / DWM chrome returns to the normal restored size (Windows 11 rounded corners look correct), but the Flutter content stays at the fullscreen size and overflows / is clipped by the smaller HWND.

This is reproducible with a clean rebuild after upgrading to 0.6.3 (flutter clean + rebuild), so it is not a stale native binary from 0.6.2.

macOS / Linux are fine with the same app code path.

Related: #60 — the classic title-bar flash on exit looks improved; the surface / client size desync remains.

Screenshots

  1. Enter fullscreen: HWND fullscreen, Flutter content still windowed-sized (black margins).
  2. Exit fullscreen: HWND restored, Flutter content still fullscreen-sized (overflow / clipped).

Environment

  • OS: Windows 11
  • Packages: nativeapi: 0.6.3, nativeapi_flutter: 0.6.3, cnativeapi: 0.6.3 (from pub.lock)
  • Flutter desktop Windows
  • Window setup: titleBarStyle = TitleBarStyle.hidden + custom in-app title bar
  • Not using maximize for this path — true fullscreen via isFullScreen

Minimal API usage

final window = WindowManager.instance.getCurrent();

// init (custom chrome)
window?.titleBarStyle = TitleBarStyle.hidden;

// enter true fullscreen (not maximize)
window?.isFullScreen = true;

// later exit
window?.isFullScreen = false;

Screenshot of the issue:
2. after fullscreen off (this doesn't cover the entire screen (and that's good), I only took the screenshot of the app not the entire desktop, the windows has the right dimensions)
photo_2026-12-02_19-45-28

  1. after fullscreen on (this one is my entire desktop screenshot):
photo_2026-12-02_19-45-25

Activity

  1. lijy91 commented on Dec 3, 2026

    @lijy91
    Member

    Thanks for the detailed follow-up and screenshots @MatteoMagnani7!

    We tested the minimal TitleBarStyle.hidden + isFullScreen = true/false flow locally on Windows 11 with flutter_window_example (Flutter 3.50) and could not reproduce the centered windowed surface / overflow or unresponsiveness, so it looks dependent on a specific Flutter version, rendering backend, or runner/plugin setup.

    Could you share a few details from your environment so we can reproduce this accurately?

    1. Output of flutter --version (and whether Impeller or Skia/ANGLE is active).
    2. Whether windows/runner/win32_window.cpp or flutter_window.cpp has any customizations (e.g. WM_SIZE, WM_NCCALCSIZE, WM_ACTIVATE, or DPI handling).
    3. Whether any other windowing or native-surface plugins are used alongside nativeapi_flutter (for example flutter_webrtc, media_kit, window_manager, flutter_acrylic, etc.).
    4. Whether window.isFullScreen = true/false works properly in a fresh flutter create app on your machine or also reproduces there.

    We also prepared a candidate fix in libnativeapi/nativeapi-core#114 / #80 that directly syncs FLUTTERVIEW and defers a follow-up WM_SIZE / repaint to the next message-loop turn and after WM_DWMNCRENDERINGCHANGED — happy to verify or refine it once we can match your environment.

  2. lijy91 commented on Dec 3, 2026

    @lijy91
    Member

    @MatteoMagnani7 Also, if possible, could you share a minimal reproducible example (e.g. a small GitHub repo or gist with pubspec.yaml, lib/main.dart, and any modified files under windows/runner/)? We also just tested a fresh flutter create Windows app with nativeapi_flutter: 0.6.3 and TitleBarStyle.hidden + isFullScreen on Windows 11 and still could not reproduce it, so a minimal repro would help us pinpoint the exact trigger right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions