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

View File

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