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:
@@ -14,6 +14,7 @@ import 'package:flutter_hbb/desktop/pages/desktop_tab_page.dart';
|
||||
import 'package:flutter_hbb/desktop/widgets/scroll_wrapper.dart';
|
||||
import 'package:flutter_hbb/models/platform_model.dart';
|
||||
import 'package:flutter_hbb/models/server_model.dart';
|
||||
import 'package:flutter_hbb/models/state_model.dart';
|
||||
import 'package:flutter_hbb/utils/multi_window_manager.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -498,6 +499,10 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
if (watchIsInputMonitoring) {
|
||||
if (bind.mainIsCanInputMonitoring(prompt: false)) {
|
||||
watchIsInputMonitoring = false;
|
||||
// Do not notify for now.
|
||||
// Monitoring may not take effect until the process is restarted.
|
||||
// rustDeskWinManager.call(
|
||||
// WindowType.RemoteDesktop, kWindowDisableGrabKeyboard, '');
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,8 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
forceRelay: args['forceRelay'],
|
||||
),
|
||||
));
|
||||
} else if (call.method == kWindowDisableGrabKeyboard) {
|
||||
stateGlobal.grabKeyboard = false;
|
||||
} else if (call.method == "onDestroy") {
|
||||
tabController.clear();
|
||||
} else if (call.method == kWindowActionRebuild) {
|
||||
|
||||
@@ -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