mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-05-10 16:18:10 +03:00
fix(terminal): flag, retry output
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -288,7 +288,8 @@ class TerminalModel with ChangeNotifier {
|
|||||||
// On reconnect, the server may replay recent output. That replay can include
|
// On reconnect, the server may replay recent output. That replay can include
|
||||||
// terminal queries like DSR/DA; xterm answers them through onOutput as
|
// terminal queries like DSR/DA; xterm answers them through onOutput as
|
||||||
// "^[[1;1R^[[2;2R^[[>0;0;0c", which must not be sent back to the peer.
|
// "^[[1;1R^[[2;2R^[[>0;0;0c", which must not be sent back to the peer.
|
||||||
_suppressNextTerminalDataOutput =
|
final replayTerminalOutput = evt['replay_terminal_output'];
|
||||||
|
_suppressNextTerminalDataOutput = replayTerminalOutput == true ||
|
||||||
message == 'Reconnected to existing terminal with pending output';
|
message == 'Reconnected to existing terminal with pending output';
|
||||||
|
|
||||||
// Fallback: if terminal view is not yet ready but already has valid
|
// Fallback: if terminal view is not yet ready but already has valid
|
||||||
|
|||||||
@@ -1135,6 +1135,10 @@ impl InvokeUiSession for FlutterHandler {
|
|||||||
("message", json!(&opened.message)),
|
("message", json!(&opened.message)),
|
||||||
("pid", json!(opened.pid)),
|
("pid", json!(opened.pid)),
|
||||||
("service_id", json!(&opened.service_id)),
|
("service_id", json!(&opened.service_id)),
|
||||||
|
(
|
||||||
|
"replay_terminal_output",
|
||||||
|
json!(opened.replay_terminal_output),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
if !opened.persistent_sessions.is_empty() {
|
if !opened.persistent_sessions.is_empty() {
|
||||||
event_data.push(("persistent_sessions", json!(opened.persistent_sessions)));
|
event_data.push(("persistent_sessions", json!(opened.persistent_sessions)));
|
||||||
|
|||||||
@@ -1118,6 +1118,7 @@ impl TerminalServiceProxy {
|
|||||||
};
|
};
|
||||||
opened.pid = session.pid;
|
opened.pid = session.pid;
|
||||||
opened.service_id = self.service_id.clone();
|
opened.service_id = self.service_id.clone();
|
||||||
|
opened.replay_terminal_output = has_pending;
|
||||||
if service.needs_session_sync {
|
if service.needs_session_sync {
|
||||||
if service.sessions.len() > 1 {
|
if service.sessions.len() > 1 {
|
||||||
// No need to include the current terminal in the list.
|
// No need to include the current terminal in the list.
|
||||||
|
|||||||
Reference in New Issue
Block a user