refact, separate remote window, debug
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
e121ed8ecb
commit
e4ac34da0d
@ -324,7 +324,11 @@ class _GeneralState extends State<_General> {
|
|||||||
kOptionSeparateRemoteWindow,
|
kOptionSeparateRemoteWindow,
|
||||||
isServer: false,
|
isServer: false,
|
||||||
update: () {
|
update: () {
|
||||||
rustDeskWinManager.separateWindows();
|
final useSeparateWindow =
|
||||||
|
mainGetLocalBoolOptionSync(kOptionSeparateRemoteWindow);
|
||||||
|
if (useSeparateWindow) {
|
||||||
|
rustDeskWinManager.separateWindows();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -1681,11 +1685,13 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
|
|||||||
var ref = value.obs;
|
var ref = value.obs;
|
||||||
onChanged(option) async {
|
onChanged(option) async {
|
||||||
if (option != null) {
|
if (option != null) {
|
||||||
ref.value = option;
|
|
||||||
if (reverse) option = !option;
|
if (reverse) option = !option;
|
||||||
isServer
|
isServer
|
||||||
? await mainSetBoolOption(key, option)
|
? await mainSetBoolOption(key, option)
|
||||||
: await mainSetLocalBoolOption(key, option);
|
: await mainSetLocalBoolOption(key, option);
|
||||||
|
ref.value = isServer
|
||||||
|
? mainGetBoolOptionSync(key)
|
||||||
|
: mainGetLocalBoolOptionSync(key);
|
||||||
update?.call();
|
update?.call();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,11 @@ class RustDeskMultiWindowManager {
|
|||||||
final sessionIdList = await DesktopMultiWindow.invokeMethod(
|
final sessionIdList = await DesktopMultiWindow.invokeMethod(
|
||||||
windowId, kWindowEventGetSessionIdList, null);
|
windowId, kWindowEventGetSessionIdList, null);
|
||||||
if (sessionIdList != null) {
|
if (sessionIdList != null) {
|
||||||
for (final idPair in sessionIdList.split(';')) {
|
final idList = sessionIdList.split(';') as List<String>;
|
||||||
|
if (idList.length <= 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (final idPair in idList.sublist(1)) {
|
||||||
final peerSession = idPair.split(',');
|
final peerSession = idPair.split(',');
|
||||||
var params = {
|
var params = {
|
||||||
'type': WindowType.RemoteDesktop.index,
|
'type': WindowType.RemoteDesktop.index,
|
||||||
@ -58,7 +62,7 @@ class RustDeskMultiWindowManager {
|
|||||||
await newSessionWindow(WindowType.RemoteDesktop, peerSession[0],
|
await newSessionWindow(WindowType.RemoteDesktop, peerSession[0],
|
||||||
jsonEncode(params), _remoteDesktopWindows);
|
jsonEncode(params), _remoteDesktopWindows);
|
||||||
await DesktopMultiWindow.invokeMethod(
|
await DesktopMultiWindow.invokeMethod(
|
||||||
windowId, kWindowEventCloseForSeparateWindow, peerSession[0]);
|
windowId, kWindowEventCloseForSeparateWindow, peerSession[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user