Commit bb993fa
fix(build): honor [tool.flet.app].hide_window_on_start in Windows runner (#6562)
* fix(build): honor [tool.flet.app].hide_window_on_start in Windows runner
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.
* docs(linux): document build prerequisites and Wayland window positioning
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>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 68dea98 commit bb993fa
2 files changed
Lines changed: 82 additions & 0 deletions
File tree
- sdk/python/templates/build/{{cookiecutter.out_dir}}/windows/runner
- website/docs/publish
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
12 | 56 | | |
13 | 57 | | |
14 | 58 | | |
15 | 59 | | |
16 | 60 | | |
17 | 61 | | |
18 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments