always block desktop settings page if video connection exists (#10224)

1. Always block desktop settings page if video connection exists, both mouse event and key event are blocked..
2. Server control page always block key event.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-12-08 18:26:55 +08:00
committed by GitHub
parent 1c17fddf51
commit d4a712bb32
11 changed files with 126 additions and 53 deletions

View File

@@ -266,6 +266,7 @@ pub enum Data {
ControlledSessionCount(usize),
CmErr(String),
CheckHwcodec,
#[cfg(feature = "flutter")]
VideoConnCount(Option<usize>),
// Although the key is not neccessary, it is used to avoid hardcoding the key.
WaylandScreencastRestoreToken((String, String)),
@@ -455,6 +456,7 @@ async fn handle(data: Data, stream: &mut Connection) {
log::info!("socks updated");
}
},
#[cfg(feature = "flutter")]
Data::VideoConnCount(None) => {
let n = crate::server::AUTHED_CONNS
.lock()