mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -326,9 +326,9 @@ class _GeneralState extends State<_General> {
|
||||
update: () {
|
||||
final useSeparateWindow =
|
||||
mainGetLocalBoolOptionSync(kOptionSeparateRemoteWindow);
|
||||
if (useSeparateWindow) {
|
||||
// if (useSeparateWindow) {
|
||||
rustDeskWinManager.separateWindows();
|
||||
}
|
||||
// }
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
@@ -1655,9 +1655,15 @@ class FFI {
|
||||
final stream = bind.sessionStart(sessionId: sessionId, id: id);
|
||||
final cb = ffiModel.startEventListener(sessionId, id);
|
||||
final useTextureRender = bind.mainUseTextureRender();
|
||||
|
||||
final SimpleWrapper<bool> isPeerInfoSent = SimpleWrapper(false);
|
||||
// Preserved for the rgba data.
|
||||
stream.listen((message) {
|
||||
if (closed) return;
|
||||
if (isSessionAdded && !isPeerInfoSent.value) {
|
||||
bind.sessionHandlePeerInfo(sessionId: sessionId);
|
||||
isPeerInfoSent.value = true;
|
||||
}
|
||||
() async {
|
||||
if (message is EventToUI_Event) {
|
||||
if (message.field0 == "close") {
|
||||
@@ -1702,10 +1708,6 @@ class FFI {
|
||||
});
|
||||
// every instance will bind a stream
|
||||
this.id = id;
|
||||
|
||||
if (isSessionAdded) {
|
||||
bind.sessionHandlePeerInfo(sessionId: sessionId);
|
||||
}
|
||||
}
|
||||
|
||||
/// Login with [password], choose if the client should [remember] it.
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/models/platform_model.dart';
|
||||
|
||||
/// must keep the order
|
||||
enum WindowType { Main, RemoteDesktop, FileTransfer, PortForward, Unknown }
|
||||
@@ -48,10 +49,10 @@ class RustDeskMultiWindowManager {
|
||||
final String sessionIdList = await DesktopMultiWindow.invokeMethod(
|
||||
windowId, kWindowEventGetSessionIdList, null);
|
||||
final idList = sessionIdList.split(';');
|
||||
if (idList.length <= 1) {
|
||||
continue;
|
||||
}
|
||||
for (final idPair in idList.sublist(1)) {
|
||||
// if (idList.length <= 1) {
|
||||
// continue;
|
||||
// }
|
||||
for (final idPair in idList) {
|
||||
final peerSession = idPair.split(',');
|
||||
var params = {
|
||||
'type': WindowType.RemoteDesktop.index,
|
||||
|
||||
Reference in New Issue
Block a user