aboutsummaryrefslogtreecommitdiff
path: root/src/server/client_transport.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-14 22:36:04 +0300
committerGitHub <noreply@github.com>2026-09-14 22:36:04 +0300
commitd8b36691d10c6055293ad45324b22af8b8f570e5 (patch)
tree42f6ff4b7ba20a59884a994b38368edd02b16ae2 /src/server/client_transport.rs
parent4c3b613c8470885df44f0844b8eaecca744c84fb (diff)
fix: avoid resending terminal cells for metadata updates (#4137)
Diffstat (limited to 'src/server/client_transport.rs')
-rw-r--r--src/server/client_transport.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/client_transport.rs b/src/server/client_transport.rs
index 210a840b..aba4ee76 100644
--- a/src/server/client_transport.rs
+++ b/src/server/client_transport.rs
@@ -398,6 +398,7 @@ pub(crate) enum ServerEvent {
endpoint_keybindings: bool,
mouse_capture: bool,
surface_active: bool,
+ surface_reuse: bool,
writer: ClientWriter,
},
/// A client sent an input message.
@@ -763,6 +764,7 @@ pub(crate) fn handle_client_handshake(
hello.endpoint_keybindings,
hello.mouse_capture,
hello.surface_active,
+ hello.surface_reuse,
)),
)
}
@@ -857,6 +859,7 @@ pub(crate) fn handle_client_handshake(
endpoint_keybindings,
mouse_capture,
surface_active,
+ surface_reuse,
)) = shell_options
{
ServerEvent::ClientShellConnected {
@@ -870,6 +873,7 @@ pub(crate) fn handle_client_handshake(
endpoint_keybindings,
mouse_capture,
surface_active,
+ surface_reuse,
writer,
}
} else {
@@ -1444,6 +1448,7 @@ mod tests {
endpoint_keybindings: true,
mouse_capture: true,
surface_active: true,
+ surface_reuse: false,
snapshot_codecs: vec![crate::protocol::endpoint::SNAPSHOT_CODEC_V1.into()],
surface_codecs: vec![crate::protocol::endpoint::SURFACE_CODEC_V1.into()],
input_codecs: vec![crate::protocol::endpoint::INPUT_CODEC_V1.into()],
@@ -1959,8 +1964,10 @@ mod tests {
endpoint_keybindings,
mouse_capture,
surface_active,
+ surface_reuse,
writer,
} => {
+ assert!(!surface_reuse);
assert_eq!(client_id, 43);
assert_eq!((surface_cols, surface_rows), (80, 29));
assert_eq!((cell_width_px, cell_height_px), (8, 16));