fix(build): honor [tool.flet.app].hide_window_on_start in Windows runner#6562
Merged
Conversation
The packaged Windows app showed its window on startup even when `hide_window_on_start = true` was set in pyproject.toml. The Dart-side `setupDesktop()` correctly skipped its own `windowManager.show()`, but the native Win32 runner (flutter_window.cpp) only consulted the `FLET_HIDE_WINDOW_ON_START` env var and unconditionally called `Show()` on the first frame, so the pyproject toggle had no effect. Templatize the runner with the same `tool.flet.<platform>.app.hide_window_on_start` / `tool.flet.app.hide_window_on_start` lookup already used by main.dart, and OR the baked-in value with the env-var check so either source hides the window at startup.
Deploying flet-website-v2 with
|
| Latest commit: |
97763c8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c3f6fe4f.flet-website-v2.pages.dev |
| Branch Preview URL: | https://fix-hide-window-on-start-win.flet-website-v2.pages.dev |
Add a Prerequisites section listing the apt packages required to build Flet Linux apps (matching linux_deps.py), noting that lld is required and that the GStreamer/mpv packages are for the Audio service and Video control. Also document that programmatic window positioning (Page.window.center(), left/top, move) is a no-op on Wayland (compositor-controlled) and works on X11/XWayland, with the GDK_BACKEND=x11 workaround. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FeodorFitsner
added a commit
that referenced
this pull request
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The packaged Windows app showed its window on startup even when
hide_window_on_start = truewas set in pyproject.toml. The Dart-sidesetupDesktop()correctly skipped its ownwindowManager.show(), but the native Win32 runner (flutter_window.cpp) only consulted theFLET_HIDE_WINDOW_ON_STARTenv var and unconditionally calledShow()on the first frame, so the pyproject toggle had no effect.Templatize the runner with the same
tool.flet.<platform>.app.hide_window_on_start/tool.flet.app.hide_window_on_startlookup already used by main.dart, and OR the baked-in value with the env-var check so either source hides the window at startup.Summary by Sourcery
Honor the hide_window_on_start configuration for packaged Windows apps by templating the Win32 runner with the pyproject setting and combining it with the existing environment variable check so the window can be hidden on startup.