mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge pull request #6565 from fufesou/fix/elevated_switch_display
fix, elevated mode, switch display
This commit is contained in:
@@ -2332,6 +2332,22 @@ impl Connection {
|
||||
}
|
||||
|
||||
async fn capture_displays(&mut self, add: &[usize], sub: &[usize], set: &[usize]) {
|
||||
#[cfg(windows)]
|
||||
if portable_client::running() && (add.len() > 0 || set.len() > 1) {
|
||||
log::info!("Capturing multiple displays is not supported in the elevated mode.");
|
||||
let mut msg_out = Message::new();
|
||||
let res = MessageBox {
|
||||
msgtype: "nook-nocancel-hasclose".to_owned(),
|
||||
title: "Prompt".to_owned(),
|
||||
text: "capture_display_elevated_connections_tip".to_owned(),
|
||||
link: "".to_owned(),
|
||||
..Default::default()
|
||||
};
|
||||
msg_out.set_message_box(res);
|
||||
self.send(msg_out).await;
|
||||
return;
|
||||
}
|
||||
|
||||
if let Some(sever) = self.server.upgrade() {
|
||||
let mut lock = sever.write().unwrap();
|
||||
for display in add.iter() {
|
||||
|
||||
@@ -878,15 +878,7 @@ pub mod client {
|
||||
}
|
||||
if portable_service_running {
|
||||
log::info!("Create shared memory capturer");
|
||||
if current_display == *display_service::PRIMARY_DISPLAY_IDX {
|
||||
return Ok(Box::new(CapturerPortable::new(current_display)));
|
||||
} else {
|
||||
bail!(
|
||||
"Ignore capture display index: {}, the primary display index is: {}",
|
||||
current_display,
|
||||
*display_service::PRIMARY_DISPLAY_IDX
|
||||
);
|
||||
}
|
||||
return Ok(Box::new(CapturerPortable::new(current_display)));
|
||||
} else {
|
||||
log::debug!("Create capturer dxgi|gdi");
|
||||
return Ok(Box::new(
|
||||
|
||||
Reference in New Issue
Block a user