mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Fix. Multi-display connection, resolutions (#7782)
* fix: multi-display, change resolution Signed-off-by: fufesou <shuanglongchen@yeah.net> * fix: multi-displays, resolutions of displays Signed-off-by: fufesou <shuanglongchen@yeah.net> * fix: build Signed-off-by: fufesou <shuanglongchen@yeah.net> * refact: Function rename Signed-off-by: fufesou <shuanglongchen@yeah.net> * refact. Function rename Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -715,6 +715,8 @@ class FfiModel with ChangeNotifier {
|
||||
// Map clone is required here, otherwise "evt" may be changed by other threads through the reference.
|
||||
// Because this function is asynchronous, there's an "await" in this function.
|
||||
cachedPeerData.peerInfo = {...evt};
|
||||
// Do not cache resolutions, because a new display connection have different resolutions.
|
||||
cachedPeerData.peerInfo.remove('resolutions');
|
||||
|
||||
// Recent peer is updated by handle_peer_info(ui_session_interface.rs) --> handle_peer_info(client.rs) --> save_config(client.rs)
|
||||
bind.mainLoadRecentPeers();
|
||||
@@ -770,7 +772,9 @@ class FfiModel with ChangeNotifier {
|
||||
}
|
||||
Map<String, dynamic> features = json.decode(evt['features']);
|
||||
_pi.features.privacyMode = features['privacy_mode'] == 1;
|
||||
handleResolutions(peerId, evt["resolutions"]);
|
||||
if (!isCache) {
|
||||
handleResolutions(peerId, evt["resolutions"]);
|
||||
}
|
||||
parent.target?.elevationModel.onPeerInfo(_pi);
|
||||
}
|
||||
if (connType == ConnType.defaultConn) {
|
||||
@@ -2317,6 +2321,8 @@ class FFI {
|
||||
}
|
||||
await ffiModel.handleCachedPeerData(data, id);
|
||||
await sessionRefreshVideo(sessionId, ffiModel.pi);
|
||||
await bind.sessionRequestNewDisplayInitMsgs(
|
||||
sessionId: sessionId, display: ffiModel.pi.currentDisplay);
|
||||
});
|
||||
isToNewWindowNotified.value = true;
|
||||
}
|
||||
|
||||
@@ -1577,5 +1577,10 @@ class RustdeskImpl {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
Future<void> sessionRequestNewDisplayInitMsgs(
|
||||
{required UuidValue sessionId, required int display, dynamic hint}) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
|
||||
void dispose() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user