An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix: scroll percent is auto reset after detecting displays change (#7845)
fufesoub403a7a25dce
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dartindex 7edaa8f06..486113eae 100644--- a/flutter/lib/models/model.dart+++ b/flutter/lib/models/model.dart@@ -1017,6 +1017,8 @@ class FfiModel with ChangeNotifier {}}}+ parent.target!.canvasModel+ .tryUpdateScrollStyle(Duration(milliseconds: 300), null);notifyListeners();}@@ -1412,10 +1414,20 @@ class CanvasModel with ChangeNotifier {if (refreshMousePos) {parent.target?.inputModel.refreshMousePos();}- if (style == kRemoteViewStyleOriginal &&- _scrollStyle == ScrollStyle.scrollbar) {- updateScrollPercent();+ tryUpdateScrollStyle(Duration.zero, style);+ }++ tryUpdateScrollStyle(Duration duration, String? style) async {+ if (_scrollStyle != ScrollStyle.scrollbar) return;+ style ??= await bind.sessionGetViewStyle(sessionId: sessionId);+ if (style != kRemoteViewStyleOriginal) {+ return;}++ _resetScroll();+ Future.delayed(duration, () async {+ updateScrollPercent();+ });}updateScrollStyle() async {