From 46f29f41af317bcf401f29b71cb659ecdfe45c15 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 27 Jun 2023 13:26:55 +0800 Subject: [PATCH] disable windows position env, https://www.reddit.com/r/rustdesk/comments/14ijhx6/windows_10_and_11_multiple_screens_causes/ --- flutter/lib/common.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 9a3e075e5..6eb925bf9 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1444,6 +1444,9 @@ Future _adjustRestoreMainWindowOffset( /// Restore window position and size on start /// Note that windowId must be provided if it's subwindow Future restoreWindowPosition(WindowType type, {int? windowId}) async { + if (bind.mainGetEnv("DISABLE_RUSTDESK_RESTORE_WINDOW_POSITION").isNotEmpty) { + return false; + } if (type != WindowType.Main && windowId == null) { debugPrint( "Error: windowId cannot be null when saving positions for sub window");