Merge pull request #3320 from Kingtous/master
fix: orderout not working when fullscreen on macos
This commit is contained in:
commit
78cbb487a8
@ -548,13 +548,20 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
if (rustDeskWinManager.getActiveWindows().contains(kMainWindowId)) {
|
if (rustDeskWinManager.getActiveWindows().contains(kMainWindowId)) {
|
||||||
await rustDeskWinManager.unregisterActiveWindow(kMainWindowId);
|
await rustDeskWinManager.unregisterActiveWindow(kMainWindowId);
|
||||||
}
|
}
|
||||||
// `hide` must be placed after unregisterActiveWindow, because once all windows are hidden,
|
// macOS specific workaround, the window is not hiding when in fullscreen.
|
||||||
// flutter closes the application on macOS. We should ensure the post-run logic has ran successfully.
|
if (Platform.isMacOS && await windowManager.isFullScreen()) {
|
||||||
// e.g.: saving window position.
|
await windowManager.setFullScreen(false);
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
}
|
||||||
await windowManager.hide();
|
await windowManager.hide();
|
||||||
} else {
|
} else {
|
||||||
// it's safe to hide the subwindow
|
// it's safe to hide the subwindow
|
||||||
await WindowController.fromWindowId(kWindowId!).hide();
|
final controller = WindowController.fromWindowId(kWindowId!);
|
||||||
|
if (Platform.isMacOS && await controller.isFullScreen()) {
|
||||||
|
await controller.setFullscreen(false);
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
}
|
||||||
|
await controller.hide();
|
||||||
await Future.wait([
|
await Future.wait([
|
||||||
rustDeskWinManager
|
rustDeskWinManager
|
||||||
.call(WindowType.Main, kWindowEventHide, {"id": kWindowId!}),
|
.call(WindowType.Main, kWindowEventHide, {"id": kWindowId!}),
|
||||||
|
@ -59,7 +59,7 @@ dependencies:
|
|||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: bc8604a88e52b2b6e64d2661ae49a71450a47af8
|
ref: f37357ed98a10717576eb9ed8413e92b2ec5d13a
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
flutter_custom_cursor: ^0.0.4
|
flutter_custom_cursor: ^0.0.4
|
||||||
window_size:
|
window_size:
|
||||||
@ -92,6 +92,7 @@ dependencies:
|
|||||||
password_strength: ^0.2.0
|
password_strength: ^0.2.0
|
||||||
flutter_launcher_icons: ^0.11.0
|
flutter_launcher_icons: ^0.11.0
|
||||||
flutter_keyboard_visibility: ^5.4.0
|
flutter_keyboard_visibility: ^5.4.0
|
||||||
|
texture_rgba_renderer: ^0.0.8
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user