privacy_mode_win_magnifier: more check on privacy mode

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-05-31 15:54:21 +08:00
parent 867d26b79c
commit 62cb9eb51e
4 changed files with 106 additions and 74 deletions

View File

@@ -154,7 +154,7 @@ pub fn start() -> ResultType<()> {
let hwnd = wait_find_privacy_hwnd(1_000)?;
if !hwnd.is_null() {
log::info!("Privacy window is already created");
log::info!("Privacy window is ready");
return Ok(());
}
@@ -320,9 +320,7 @@ async fn set_privacy_mode_state(
state: PrivacyModeState,
ms_timeout: u64,
) -> ResultType<()> {
println!("set_privacy_mode_state begin");
let mut c = connect(ms_timeout, "_cm").await?;
println!("set_privacy_mode_state connect done");
c.send(&Data::PrivacyModeState((conn_id, state))).await
}