win_fix_multi_tab: debug flutter done

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2022-10-27 15:52:40 +08:00
parent 38803f0de5
commit 4551383474
2 changed files with 6 additions and 9 deletions

View File

@ -24,8 +24,9 @@ class ConnectionTabPage extends StatefulWidget {
} }
class _ConnectionTabPageState extends State<ConnectionTabPage> { class _ConnectionTabPageState extends State<ConnectionTabPage> {
final tabController = final tabController = Get.put(DesktopTabController(
Get.put(DesktopTabController(tabType: DesktopTabType.remoteScreen)); tabType: DesktopTabType.remoteScreen,
onSelected: (_, id) => bind.setCurSessionId(id: id)));
static const IconData selectedIcon = Icons.desktop_windows_sharp; static const IconData selectedIcon = Icons.desktop_windows_sharp;
static const IconData unselectedIcon = Icons.desktop_windows_outlined; static const IconData unselectedIcon = Icons.desktop_windows_outlined;
@ -60,7 +61,6 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
super.initState(); super.initState();
tabController.onRemoved = (_, id) => onRemoveId(id); tabController.onRemoved = (_, id) => onRemoveId(id);
tabController.onSelected = (_, id) => onSelectId(id);
rustDeskWinManager.setMethodHandler((call, fromWindowId) async { rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
print( print(
@ -175,10 +175,6 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
_update_remote_count(); _update_remote_count();
} }
void onSelectId(String id) {
bind.setCurSessionId(id: id);
}
int windowId() { int windowId() {
return widget.params["windowId"]; return widget.params["windowId"];
} }

View File

@ -320,8 +320,9 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
log::info!("cm ipc connection disconnect"); log::info!("cm ipc connection disconnect");
break; break;
} }
Data::PrivacyModeState((id, _)) => { Data::PrivacyModeState((_id, _)) => {
cm_inner_send(id, data); #[cfg(windows)]
cm_inner_send(_id, data);
} }
Data::ClickTime(ms) => { Data::ClickTime(ms) => {
CLICK_TIME.store(ms, Ordering::SeqCst); CLICK_TIME.store(ms, Ordering::SeqCst);