Skip to content

bug: AppView.FLET_APP_HIDDEN briefly flashes the Windows desktop client before the window is centered or explicitly shown #6526

@ihmily

Description

@ihmily

Duplicate Check

Describe the bug

When running a Flet desktop app on Windows with ft.run(..., view=ft.AppView.FLET_APP_HIDDEN), the window is expected to start hidden so the app can resize, move, or center it before showing it to the user.

In practice, the native flet.exe window briefly appears in the top-left corner during startup before the app finishes its pre-show setup. After that, the app is centered correctly and later shown as expected, but there is still a visible startup flash.

This makes the documented "Hidden app window on startup" behavior incorrect on Windows, because the window is not actually hidden for the whole startup phase.

Code sample

Use the docs example code: https://flet.dev/docs/controls/page/#hidden-app-window-on-startup

Code
import asyncio

import flet as ft


async def main(page: ft.Page):
    print("Window is hidden on start. Will show after 3 seconds...")
    page.add(
        ft.SafeArea(
            content=ft.Column(
                controls=[
                    ft.Text("Hello!"),
                ]
            )
        )
    )

    # some configuration that we want to do before showing the window
    page.window.width = 300
    page.window.height = 200
    page.update()
    await page.window.center()

    # wait for 3 seconds before showing the window
    await asyncio.sleep(3)

    # show the window
    page.window.visible = True
    page.update()


if __name__ == "__main__":
    ft.run(main, view=ft.AppView.FLET_APP_HIDDEN)

To reproduce

1.Run it on Windows.
2.Observe the startup sequence carefully.
3.A native flet.exe window briefly flashes in the top-left corner before the centered window is finally shown.

Expected behavior

When view=ft.AppView.FLET_APP_HIDDEN is used, no desktop window should become visible until the app explicitly sets page.window.visible = True.

The app should be able to resize, reposition, or center the window while it is still hidden.

Screenshots / Videos

Attach a short screen recording showing:

a brief flash of the native window in the top-left corner at startup
the final centered window appearing later

Captures
_2026_05_27_15_00_01_777.mp4

Operating System

Windows

Operating system details

Windows 10

Flet version

0.85.2

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions