Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Use frameless window to implement fullscreen #456

Open
YuiHrsw opened this issue May 9, 2024 · 0 comments
Open

[Windows] Use frameless window to implement fullscreen #456

YuiHrsw opened this issue May 9, 2024 · 0 comments

Comments

@YuiHrsw
Copy link

YuiHrsw commented May 9, 2024

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();
await windowManager.setAsFrameless();
await windowManager.setPosition(Offset.zero);
// my windows display scaling is 200%
await windowManager.setSize(Size(info!.frame.width / 2, info!.frame.height / 2));

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?

@YuiHrsw YuiHrsw changed the title Use frameless window to implement fullscreen on windows [Windows] Use frameless window to implement fullscreen on windows May 9, 2024
@YuiHrsw YuiHrsw changed the title [Windows] Use frameless window to implement fullscreen on windows [Windows] Use frameless window to implement fullscreen May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant