From 343bcbb36363d393bd4a45e0de7d94af7ae96095 Mon Sep 17 00:00:00 2001 From: dignow Date: Thu, 27 Jul 2023 09:11:43 +0800 Subject: [PATCH] adjust window offset on start Signed-off-by: dignow --- flutter/lib/common.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 4a3813ba6..af1f200b2 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1486,10 +1486,11 @@ Future _adjustRestoreMainWindowOffset( : kMobileMaxDisplaySize) .toDouble(); } - if (left > frameRight! || - top > frameBottom! || - (left + width) < frameLeft || - (top + height) < frameTop!) { + final minWidth = 10.0; + if ((left - minWidth) > frameRight! || + (top - minWidth) > frameBottom! || + (left + width + minWidth) < frameLeft || + top < frameTop!) { return null; } else { return Offset(left, top);