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");