diff options
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index f78150ac..13125c2d 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -535,6 +535,10 @@ async fn run_client_loop( } else { crate::protocol::MAX_FRAME_SIZE }; + let negotiation = endpoint::EndpointNegotiation::new( + handshake.endpoint_methods.unwrap_or_default(), + handshake.endpoint_capabilities.unwrap_or_default(), + ); let transport = start_endpoint_transport( stream, (), @@ -542,11 +546,8 @@ async fn run_client_loop( endpoint::ClientEndpointId::Local, 1, max_frame_size, + negotiation.supports_capability(protocol::surface_reuse::CAPABILITY), )?; - let negotiation = endpoint::EndpointNegotiation::new( - handshake.endpoint_methods.unwrap_or_default(), - handshake.endpoint_capabilities.unwrap_or_default(), - ); let mut registry = endpoint::EndpointRegistry::new(transport, 1, negotiation); if state.shell.is_some() { registry.send(&ClientMessage::ClientShellFocus { focused: true }); @@ -1195,6 +1196,8 @@ async fn run_client_loop( ) { continue; } + let surface_reuse = + negotiation.supports_capability(protocol::surface_reuse::CAPABILITY); let agent_view_projection_supported = negotiation.supports_capability( crate::protocol::endpoint::AGENT_VIEW_PROJECTION_CAPABILITY, ); @@ -1226,6 +1229,7 @@ async fn run_client_loop( MAX_GRAPHICS_FRAME_SIZE, endpoint_id, generation, + surface_reuse, ); }); } |
