diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-16 00:58:23 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-16 00:58:23 +0300 |
| commit | 18061191fdc019498610aee81f0df93f6c2ebd31 (patch) | |
| tree | ab44d1c6939f1e9b5657512e831c6e50969941a2 /src/protocol/endpoint.rs | |
| parent | fc548768db4771fcc68590f56713a20afa53850a (diff) | |
fix: keep remote surface updates incremental (#4209)
refs #3769
refs #3745
Diffstat (limited to 'src/protocol/endpoint.rs')
| -rw-r--r-- | src/protocol/endpoint.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocol/endpoint.rs b/src/protocol/endpoint.rs index 2f7c8338..df83b242 100644 --- a/src/protocol/endpoint.rs +++ b/src/protocol/endpoint.rs @@ -49,6 +49,9 @@ pub struct EndpointClientHello { /// Accept the optional cell-retaining surface encoding on this connection. #[serde(default)] pub surface_reuse: bool, + /// Accept the optional surface-delta encoding on this connection. + #[serde(default)] + pub surface_delta: bool, #[serde(default)] pub snapshot_codecs: Vec<String>, #[serde(default)] @@ -143,6 +146,7 @@ impl EndpointServerWelcome { methods, capabilities: vec![ super::surface_reuse::CAPABILITY.into(), + super::surface_delta::CAPABILITY.into(), SURFACE_INTEREST_CAPABILITY.into(), PRESENTATION_EFFECTS_FENCE_CAPABILITY.into(), HEALTH_CHECK_CAPABILITY.into(), @@ -186,6 +190,7 @@ mod tests { mouse_capture: true, surface_active: true, surface_reuse: false, + surface_delta: false, snapshot_codecs: vec![SNAPSHOT_CODEC_V1.into()], surface_codecs: vec![SURFACE_CODEC_V1.into()], input_codecs: vec![INPUT_CODEC_V1.into()], @@ -333,9 +338,11 @@ mod tests { let mut value = serde_json::to_value(hello()).unwrap(); value.as_object_mut().unwrap().remove("surface_active"); value.as_object_mut().unwrap().remove("surface_reuse"); + value.as_object_mut().unwrap().remove("surface_delta"); let decoded: EndpointClientHello = serde_json::from_value(value).unwrap(); assert!(decoded.surface_active); assert!(!decoded.surface_reuse); + assert!(!decoded.surface_delta); } #[test] @@ -345,6 +352,7 @@ mod tests { welcome.capabilities, vec