mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-13 10:11:30 +03:00
refact: terminal, save window pos on close (#12370)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -460,9 +460,13 @@ class RustDeskMultiWindowManager {
|
|||||||
if (windows.isEmpty) {
|
if (windows.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (final wId in windows) {
|
for (int i = 0; i < windows.length; i++) {
|
||||||
debugPrint("closing multi window, type: ${type.toString()} id: $wId");
|
final wId = windows[i];
|
||||||
await saveWindowPosition(type, windowId: wId);
|
final shouldSavePos = type != WindowType.Terminal || i == windows.length - 1;
|
||||||
|
if (shouldSavePos) {
|
||||||
|
debugPrint("closing multi window, type: ${type.toString()} id: $wId");
|
||||||
|
await saveWindowPosition(type, windowId: wId);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await WindowController.fromWindowId(wId).setPreventClose(false);
|
await WindowController.fromWindowId(wId).setPreventClose(false);
|
||||||
await WindowController.fromWindowId(wId).close();
|
await WindowController.fromWindowId(wId).close();
|
||||||
|
|||||||
Reference in New Issue
Block a user