Merge pull request #5266 from dignow/refact/separate_remote_window
fix, reuse window type
This commit is contained in:
commit
9dd7b4d5d8
@ -90,22 +90,21 @@ class RustDeskMultiWindowManager {
|
|||||||
) async {
|
) async {
|
||||||
if (separateWindow) {
|
if (separateWindow) {
|
||||||
if (kCloseMultiWindowByHide && _inactiveWindows.isNotEmpty) {
|
if (kCloseMultiWindowByHide && _inactiveWindows.isNotEmpty) {
|
||||||
final windowId = _inactiveWindows.first;
|
for (final windowId in windows) {
|
||||||
final invokeRes =
|
if (_inactiveWindows.contains(windowId)) {
|
||||||
await DesktopMultiWindow.invokeMethod(windowId, methodName, msg);
|
await DesktopMultiWindow.invokeMethod(
|
||||||
final windowController = WindowController.fromWindowId(windowId);
|
windowId, methodName, msg);
|
||||||
windowController.show();
|
WindowController.fromWindowId(windowId).show();
|
||||||
registerActiveWindow(windowController.windowId);
|
registerActiveWindow(windowId);
|
||||||
windows.add(windowController.windowId);
|
}
|
||||||
return invokeRes;
|
}
|
||||||
} else {
|
|
||||||
await newSessionWindow(type, remoteId, msg, windows);
|
|
||||||
}
|
}
|
||||||
|
await newSessionWindow(type, remoteId, msg, windows);
|
||||||
} else {
|
} else {
|
||||||
if (windows.isEmpty) {
|
if (windows.isEmpty) {
|
||||||
await newSessionWindow(type, remoteId, msg, windows);
|
await newSessionWindow(type, remoteId, msg, windows);
|
||||||
} else {
|
} else {
|
||||||
return call(type, methodName, msg);
|
call(type, methodName, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user