leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
699 stars 190 forks source link

The `fullScreen` is not functioning properly. #458

Open ibaoyun opened 4 months ago

ibaoyun commented 4 months ago

During waitUntilReadyToShow, the fullScreen is set to true. However, when the window is restored using setFullScreen(false), it only displays the background color without any content and the taskbar icon also disappears. Additionally, calling windowManager.minimize(); has no effect either. The platform in use is Windows.

Arvinth-Krishna commented 4 months ago

Yes, I'm facing the same issue, when I switch from one display to another.

humam-alBasha commented 4 months ago

You can skip the issue until it is resolved .

const WindowOptions windowOptions = WindowOptions( size: Size(800, 600), center: true, backgroundColor: Colors.transparent, skipTaskbar: false, // titleBarStyle: TitleBarStyle.hidden, ); windowManager.waitUntilReadyToShow(windowOptions, () async { await windowManager.show(); await windowManager.focus(); await windowManager.setFullScreen(true); });

humam-alBasha commented 4 months ago

In the setFullScreen function , setSize is Future function need await // (Windows) Force refresh the app so it 's back to the correct size // (see GitHub issue #311) if (Platform.isWindows) { final size = await getSize(); setSize(size + const Offset(1, 1)); setSize(size); }

Markus43 commented 2 months ago

Just to add: There's a working plugin for windows here: https://pub.dev/packages/fullscreen_window - might be interesting to compare the code and evaluate the differences.