An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
remember remote window fullscreen, set global state
dignow17af5622eca6
diff --git a/flutter/lib/desktop/pages/remote_tab_page.dart b/flutter/lib/desktop/pages/remote_tab_page.dartindex 4467adad4..0490ce373 100644--- a/flutter/lib/desktop/pages/remote_tab_page.dart+++ b/flutter/lib/desktop/pages/remote_tab_page.dart@@ -410,6 +410,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {void onRemoveId(String id) async {if (tabController.state.value.tabs.isEmpty) {await WindowController.fromWindowId(windowId()).close();+ stateGlobal.setFullscreen(false, procWnd: false);}ConnectionTypeState.delete(id);_update_remote_count();diff --git a/flutter/lib/models/state_model.dart b/flutter/lib/models/state_model.dartindex d7784f652..a70d0f97d 100644--- a/flutter/lib/models/state_model.dart+++ b/flutter/lib/models/state_model.dart@@ -64,7 +64,7 @@ class StateGlobal {setMinimized(bool v) => _isMinimized = v;- setFullscreen(bool v) {+ setFullscreen(bool v, {bool procWnd = true}) {if (_fullscreen != v) {_fullscreen = v;_showTabBar.value = !_fullscreen;@@ -76,20 +76,22 @@ class StateGlobal {print("fullscreen: $fullscreen, resizeEdgeSize: ${_resizeEdgeSize.value}");_windowBorderWidth.value = fullscreen ? 0 : kWindowBorderWidth;- WindowController.fromWindowId(windowId)- .setFullscreen(_fullscreen)- .then((_) {- // https://github.com/leanflutter/window_manager/issues/131#issuecomment-1111587982- if (Platform.isWindows && !v) {- Future.delayed(Duration.zero, () async {- final frame =- await WindowController.fromWindowId(windowId).getFrame();- final newRect = Rect.fromLTWH(- frame.left, frame.top, frame.width + 1, frame.height + 1);- await WindowController.fromWindowId(windowId).setFrame(newRect);- });- }- });+ if (procWnd) {+ WindowController.fromWindowId(windowId)+ .setFullscreen(_fullscreen)+ .then((_) {+ // https://github.com/leanflutter/window_manager/issues/131#issuecomment-1111587982+ if (Platform.isWindows && !v) {+ Future.delayed(Duration.zero, () async {+ final frame =+ await WindowController.fromWindowId(windowId).getFrame();+ final newRect = Rect.fromLTWH(+ frame.left, frame.top, frame.width + 1, frame.height + 1);+ await WindowController.fromWindowId(windowId).setFrame(newRect);+ });+ }+ });+ }}}