tmp commit
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
8bb851704a
commit
32c349dd8b
@ -40,7 +40,6 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
bind.cmClear();
|
|
||||||
windowManager.removeListener(this);
|
windowManager.removeListener(this);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ class PlatformFFI {
|
|||||||
'_appType:$_appType,info1-id:$id,info2-name:$name,dir:$_dir');
|
'_appType:$_appType,info1-id:$id,info2-name:$name,dir:$_dir');
|
||||||
}
|
}
|
||||||
if (desktopType == DesktopType.cm) {
|
if (desktopType == DesktopType.cm) {
|
||||||
await _ffiBind.cmStartListenIpcThread();
|
await _ffiBind.cmInit();
|
||||||
}
|
}
|
||||||
await _ffiBind.mainDeviceId(id: id);
|
await _ffiBind.mainDeviceId(id: id);
|
||||||
await _ffiBind.mainDeviceName(name: name);
|
await _ffiBind.mainDeviceName(name: name);
|
||||||
|
@ -910,7 +910,7 @@ pub mod connection_manager {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
pub fn start_listen_ipc_thread() {
|
fn start_listen_ipc_thread() {
|
||||||
start_listen_ipc(true);
|
start_listen_ipc(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -931,8 +931,22 @@ pub mod connection_manager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
extern "C" fn cm_clear_hook() {
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
crate::privacy_win_mag::stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn cm_init() {
|
||||||
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
|
start_listen_ipc_thread();
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
shutdown_hooks::add_shutdown_hook(cm_clear_hook);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn cm_clear() {
|
pub fn cm_clear() {
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
crate::privacy_win_mag::stop();
|
crate::privacy_win_mag::stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,13 +1448,13 @@ pub fn main_use_texture_render() -> SyncReturn<bool> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cm_start_listen_ipc_thread() {
|
pub fn cm_init() {
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
crate::flutter::connection_manager::start_listen_ipc_thread();
|
crate::flutter::connection_manager::cm_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cm_clear() {
|
pub fn cm_clear() {
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
crate::flutter::connection_manager::cm_clear();
|
crate::flutter::connection_manager::cm_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user