fix, use RxBool to sync fullscreen state (remote toolbar)

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-10-17 14:29:14 +08:00
parent f1d3a553d1
commit f9f463e799
4 changed files with 21 additions and 22 deletions

View File

@@ -1494,7 +1494,7 @@ Future<void> saveWindowPosition(WindowType type, {int? windowId}) async {
late Offset position;
late Size sz;
late bool isMaximized;
bool isFullscreen = stateGlobal.fullscreen ||
bool isFullscreen = stateGlobal.fullscreen.isTrue ||
(Platform.isMacOS && stateGlobal.closeOnFullscreen);
setFrameIfMaximized() {
if (isMaximized) {
@@ -2710,7 +2710,7 @@ tryMoveToScreenAndSetFullscreen(Rect? screenRect) async {
final curFrame = await wc.getFrame();
final frame =
Rect.fromLTWH(screenRect.left + 30, screenRect.top + 30, 600, 400);
if (stateGlobal.fullscreen &&
if (stateGlobal.fullscreen.isTrue &&
curFrame.left <= frame.left &&
curFrame.top <= frame.top &&
curFrame.width >= frame.width &&