Skip to content

[Windows] Use frameless window to implement fullscreen #456

Closed
@YuiHrsw

Description

@YuiHrsw

The current setFullscreen() function on Windows may show the native window border as described in #211 and the application content may flicker after setFullscreen(true), Sometimes it may freeze the UI.

On windows, there is another way to make application fullscreen:

1.Set the application to use frameless window.
2.Set the window size to the screen size.
3.Make the window cover the whole screen.

The windows taskbar will automatically hide itself.

I use the window_size package to get screen size:

              var info = await getCurrentScreen();
              if (info != null) {
                await windowManager.setAsFrameless();
                await windowManager.setPosition(Offset.zero);
                await windowManager.setSize(
                  Size(
                    info.frame.width / info.scaleFactor,
                    info.frame.height / info.scaleFactor,
                  ),
                );
              }

When the application is maximized, use the original way to set fullscreen.
This code to enter fullscreen mode works fine on my computer.

Could you provide an option to use this way to set fullscreen on windows?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions