fix(desktop-window): apply bidirectional frameless/titlebar updates and clear progress bar correctly#6114
fix(desktop-window): apply bidirectional frameless/titlebar updates and clear progress bar correctly#6114ndonkoHenri wants to merge 4 commits intomainfrom
Conversation
Deploying flet-examples with
|
| Latest commit: |
2ef1a18
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f02e2d06.flet-examples.pages.dev |
| Branch Preview URL: | https://fix-window-updates.flet-examples.pages.dev |
There was a problem hiding this comment.
Pull request overview
Improves desktop window state synchronization in WindowService to correctly apply repeated updates for frameless mode, title bar visibility/buttons visibility, and progress bar clearing.
Changes:
- Track and apply
title_bar_buttons_hiddenupdates independently oftitle_bar_hiddenchanges. - Make frameless handling bidirectional (enable and disable).
- Allow clearing the native progress indicator by translating
nullprogress to-1.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Restore non-frameless window chrome | ||
| await setWindowTitleBarVisibility( | ||
| titleBarHidden ?? false, | ||
| titleBarButtonsHidden, |
There was a problem hiding this comment.
When disabling frameless mode, the restore path uses titleBarHidden ?? false, which can incorrectly force the title bar to become visible if titleBarHidden is omitted (null) but _titleBarHidden was previously true. Use the already-computed effective/cached state (e.g., _titleBarHidden ?? false) instead of defaulting to false so toggling frameless doesn’t unexpectedly change the title bar visibility.
| // Restore non-frameless window chrome | |
| await setWindowTitleBarVisibility( | |
| titleBarHidden ?? false, | |
| titleBarButtonsHidden, | |
| // Restore non-frameless window chrome using cached state | |
| await setWindowTitleBarVisibility( | |
| _titleBarHidden ?? false, | |
| _titleBarButtonsHidden, |
Deploying flet-docs with
|
| Latest commit: |
2ef1a18
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://89134c90.flet-docs.pages.dev |
| Branch Preview URL: | https://fix-window-updates.flet-docs.pages.dev |
WindowServiceso toggles behave correctly across repeated changes.false -> trueandtrue -> false) instead of only enabling frameless once. (fixpage.window_frameless=Falsedoes not restore window chrome after frameless mode #2802)title_bar_buttons_hiddenupdates even whentitle_bar_hiddenitself does not change.window.progress_barby handlingNone/null transitions and sending native clear value (-1).Summary by Sourcery
Improve desktop window state handling to correctly apply frameless, title bar visibility, and progress bar updates across repeated state changes.
Bug Fixes: