Repository navigation
Fix Window.skip_task_bar not hiding the app from the taskbar on Windows - #6946
Open
ndonkoHenri wants to merge 5 commits into
Open
ndonkoHenri wants to merge 5 commits into
ndonkoHenri wants to merge 5 commits into
Conversation
window_manager's isSkipTaskbar() starts out true on Windows, so the cached window state already said the window was hidden from the taskbar and setting skip_task_bar to True was skipped. Track the value Flet last applied instead.
The value Flet last applied lives in the Dart isolate, which a Flutter hot restart resets while the native window keeps its taskbar state. Start from unknown instead of false, so the first requested value is always applied.
window_manager hides the taskbar button with ITaskbarList::DeleteTab, which on Windows 11 also drops the window from Alt+Tab, so a window minimized while hidden has no way back unless the app provides one.
ndonkoHenri
requested review from
FeodorFitsner
and
a balanced review from Copilot
October 10, 2026 18:55
Deploying flet-website-v2 with
|
| Latest commit: |
6b4d1fd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2322ef48.flet-website-v2.pages.dev |
| Branch Preview URL: | https://fix-windows-skip-taskbar-630.flet-website-v2.pages.dev |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The platform-specific state synchronization correctly addresses the reported Windows behavior without affecting macOS or Linux.
0 open findings
What changed in this PR
Fixes Windows taskbar hiding by tracking the last successfully applied state instead of relying on window_manager’s incorrect initial flag.
Changes:
- Track Windows taskbar visibility as nullable state.
- Apply the first requested value after startup or hot restart.
- Document Windows 11 Alt+Tab behavior and add a changelog entry.
| File | Description |
|---|---|
packages/flet/lib/src/utils/desktop.dart |
Tracks and reports the applied Windows taskbar state. |
packages/flet/lib/src/models/window_state.dart |
Makes skipTaskBar nullable. |
sdk/python/packages/flet/src/flet/controls/core/window.py |
Documents Windows 11 behavior. |
CHANGELOG.md |
Records the user-facing fix. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Fixes #6302
The bug
On Windows,
page.window.skip_task_bar = Trueleft the taskbar button in place.The window service caches the window's state when it starts and applies a property only when the requested value differs from the cached one. On Windows,
window_manager'sisSkipTaskbar()doesn't ask the OS. It returns an internal flag that starts outtrue(bool is_skip_taskbar_ = true;inwindow_manager.cpp) and that onlysetSkipTaskbar()updates, even though a new window has a taskbar button. So the cache said the window was already hidden from the taskbar,Truelooked unchanged, andsetSkipTaskbar(true)was never called. SettingFalseand thenTrueworked, which made it look random. macOS and Linux report a real starting value and weren't affected.The fix
getWindowState()reports the value Flet last applied throughsetWindowSkipTaskBar()instead ofwindow_manager's flag. macOS and Linux are unchanged.null) rather thanfalse. A Flutter hot restart resets Dart state while the native window keeps its taskbar state, so the first requested value is always applied.WindowState.skipTaskBaris nowbool?.Window.skip_task_bar's docstring now notes that on Windows 11 the window is also hidden from Alt+Tab.window_managerremoves the taskbar tab, which also drops the window from Alt+Tab there, so a window minimized while hidden can only be restored by the app itself.Testing
skip_task_bar=Trueset inmain()left the taskbar button in place; with it, the button is gone from the start.WindowServicewith a mockedwindow_managerchannel that reportstruebefore any set, as on Windows. Its Windows startup cases fail onflet-1.1.0and pass with this change; 8 of 8 cases pass.packages/fletsuite passes, andflutter analyzeshows no new issues.Summary by Sourcery
Ensure Windows taskbar visibility is correctly applied and documented for hidden windows.
Bug Fixes:
Window.skip_task_bar = Trueso Windows desktop windows are reliably hidden from the taskbar, including on initial startup and after Flutter hot restart.Enhancements: