mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
config_input not well tested yet
This commit is contained in:
@@ -42,6 +42,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
var svcStopped = false.obs;
|
||||
var watchIsCanScreenRecording = false;
|
||||
var watchIsProcessTrust = false;
|
||||
var watchIsInputMonitoring = false;
|
||||
Timer? _updateTimer;
|
||||
|
||||
@override
|
||||
@@ -334,6 +335,12 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
bind.mainIsProcessTrusted(prompt: true);
|
||||
watchIsProcessTrust = true;
|
||||
}, help: 'Help', link: translate("doc_mac_permission"));
|
||||
} else if (!bind.mainIsCanInputMonitoring(prompt: false)) {
|
||||
return buildInstallCard("Permissions", "config_input", "Configure",
|
||||
() async {
|
||||
bind.mainIsCanInputMonitoring(prompt: true);
|
||||
watchIsInputMonitoring = true;
|
||||
}, help: 'Help', link: translate("doc_mac_permission"));
|
||||
} else if (!svcStopped.value &&
|
||||
bind.mainIsInstalled() &&
|
||||
!bind.mainIsInstalledDaemon(prompt: false)) {
|
||||
@@ -467,6 +474,12 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
if (watchIsInputMonitoring) {
|
||||
if (bind.mainIsCanInputMonitoring(prompt: false)) {
|
||||
watchIsInputMonitoring = false;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
Get.put<RxBool>(svcStopped, tag: 'stop-service');
|
||||
rustDeskWinManager.registerActiveWindowListener(onActiveWindowChanged);
|
||||
|
||||
Reference in New Issue
Block a user