mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
elevation: keyboard permission required and remove foreground filter
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -2047,12 +2047,18 @@ impl Connection {
|
||||
|
||||
#[cfg(windows)]
|
||||
async fn handle_elevation_request(&mut self, para: portable_client::StartPara) {
|
||||
let mut err = "No need to elevate".to_string();
|
||||
if !crate::platform::is_installed() && !portable_client::running() {
|
||||
err = portable_client::start_portable_service(para)
|
||||
.err()
|
||||
.map_or("".to_string(), |e| e.to_string());
|
||||
let mut err;
|
||||
if !self.keyboard {
|
||||
err = "No permission".to_string();
|
||||
} else {
|
||||
err = "No need to elevate".to_string();
|
||||
if !crate::platform::is_installed() && !portable_client::running() {
|
||||
err = portable_client::start_portable_service(para)
|
||||
.err()
|
||||
.map_or("".to_string(), |e| e.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
let mut misc = Misc::new();
|
||||
misc.set_elevation_response(err);
|
||||
let mut msg = Message::new();
|
||||
@@ -2369,6 +2375,7 @@ impl Connection {
|
||||
if self.portable.is_installed
|
||||
|| self.file_transfer.is_some()
|
||||
|| self.port_forward_socket.is_some()
|
||||
|| !self.keyboard
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user