diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-30 23:58:15 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-30 23:58:34 +0300 |
| commit | fc4e1bbf6b0fa2ec37445a5b72356514c7c6be6a (patch) | |
| tree | 93af04af44a4dcc062a7886c51d70641c1903144 /src/client/mod.rs | |
| parent | d477341e6af816ff4396042b084a0378ef437b4a (diff) | |
perf: reduce sidebar git polling overhead
refs #353
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 3e146f47..0a1b9507 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -31,9 +31,9 @@ use tracing::{debug, info, warn}; use crate::protocol::render_ansi; use crate::protocol::{ - self, AttachScrollDirection, AttachScrollSource, ClientKeybindings, ClientMessage, NotifyKind, - RenderEncoding, ServerMessage, MAX_CLIPBOARD_IMAGE_PAYLOAD, MAX_FRAME_SIZE, - MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION, + self, AttachScrollDirection, AttachScrollSource, ClientKeybindings, ClientLaunchMode, + ClientMessage, NotifyKind, RenderEncoding, ServerMessage, MAX_CLIPBOARD_IMAGE_PAYLOAD, + MAX_FRAME_SIZE, MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION, }; use crate::server::socket_paths::client_socket_path; @@ -420,6 +420,7 @@ fn do_handshake( cell_width_px: u32, cell_height_px: u32, requested_encoding: RenderEncoding, + direct_attach_requested: bool, ) -> Result<RenderEncoding, ClientError> { stream .set_nonblocking(false) @@ -434,6 +435,11 @@ fn do_handshake( cell_height_px, requested_encoding, keybindings: requested_keybindings(), + launch_mode: if direct_attach_requested { + ClientLaunchMode::TerminalAttach + } else { + ClientLaunchMode::App + }, }; protocol::write_message(stream, &hello) .map_err(|e| ClientError::ConnectionFailed(io::Error::other(e.to_string())))?; @@ -549,6 +555,7 @@ fn run_client_with_mode( cell_width_px, cell_height_px, requested_encoding, + direct_attach_requested, ) { Ok(encoding) => encoding, Err(err) => { |
