From 547da310957f597ae6d0608cc5f329b9f9ec6a77 Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:41:55 +0800 Subject: [PATCH] fix: windows, exit fullscreen, remove redraw (#9700) Signed-off-by: fufesou --- flutter/lib/models/state_model.dart | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/flutter/lib/models/state_model.dart b/flutter/lib/models/state_model.dart index 3481aa2b3..f8f06cc3f 100644 --- a/flutter/lib/models/state_model.dart +++ b/flutter/lib/models/state_model.dart @@ -101,15 +101,8 @@ class StateGlobal { if (procWnd) { final wc = WindowController.fromWindowId(windowId); wc.setFullscreen(_fullscreen.isTrue).then((_) { - // https://github.com/leanflutter/window_manager/issues/131#issuecomment-1111587982 - if (isWindows && _fullscreen.isFalse) { - Future.delayed(Duration.zero, () async { - final frame = await wc.getFrame(); - final newRect = Rect.fromLTWH( - frame.left, frame.top, frame.width + 1, frame.height + 1); - await wc.setFrame(newRect); - }); - } + // We remove the redraw (width + 1, height + 1), because this issue cannot be reproduced. + // https://github.com/rustdesk/rustdesk/issues/9675 }); } }