mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge remote-tracking branch 'upstream/master' into file-manager-redesign
This commit is contained in:
@@ -650,6 +650,12 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
}
|
||||
|
||||
Widget _buildKeyboard(BuildContext context) {
|
||||
// Do not support peer 1.1.9.
|
||||
if (stateGlobal.grabKeyboard) {
|
||||
bind.sessionSetKeyboardMode(id: widget.id, value: 'map');
|
||||
return Offstage();
|
||||
}
|
||||
|
||||
FfiModel ffiModel = Provider.of<FfiModel>(context);
|
||||
if (ffiModel.permissions['keyboard'] == false) {
|
||||
return Offstage();
|
||||
|
||||
@@ -548,13 +548,20 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
if (rustDeskWinManager.getActiveWindows().contains(kMainWindowId)) {
|
||||
await rustDeskWinManager.unregisterActiveWindow(kMainWindowId);
|
||||
}
|
||||
// `hide` must be placed after unregisterActiveWindow, because once all windows are hidden,
|
||||
// flutter closes the application on macOS. We should ensure the post-run logic has ran successfully.
|
||||
// e.g.: saving window position.
|
||||
// macOS specific workaround, the window is not hiding when in fullscreen.
|
||||
if (Platform.isMacOS && await windowManager.isFullScreen()) {
|
||||
await windowManager.setFullScreen(false);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
}
|
||||
await windowManager.hide();
|
||||
} else {
|
||||
// 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([
|
||||
rustDeskWinManager
|
||||
.call(WindowType.Main, kWindowEventHide, {"id": kWindowId!}),
|
||||
|
||||
Reference in New Issue
Block a user