aboutsummaryrefslogtreecommitdiff
path: root/src/server/client_transport.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-24 21:21:58 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-24 21:30:04 +0300
commit420925d141c8805e610eb0d62d49d8b9b483d961 (patch)
treebbd1f778a038bf4387c704a0df921fa53e7af615 /src/server/client_transport.rs
parent43c6ca3a5dbdcefc6c6dc29be9ce81d990baf39e (diff)
fix: support scrolling direct agent attaches
Diffstat (limited to 'src/server/client_transport.rs')
-rw-r--r--src/server/client_transport.rs31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/server/client_transport.rs b/src/server/client_transport.rs
index 5a5984aa..36334fda 100644
--- a/src/server/client_transport.rs
+++ b/src/server/client_transport.rs
@@ -14,8 +14,9 @@ use tokio::sync::mpsc;
use tracing::{debug, warn};
use crate::protocol::{
- self, ClientKeybindings, ClientMessage, RenderEncoding, ServerMessage,
- MAX_CLIPBOARD_IMAGE_PAYLOAD, MAX_FRAME_SIZE, MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION,
+ self, AttachScrollDirection, AttachScrollSource, ClientKeybindings, ClientMessage,
+ RenderEncoding, ServerMessage, MAX_CLIPBOARD_IMAGE_PAYLOAD, MAX_FRAME_SIZE,
+ MAX_GRAPHICS_FRAME_SIZE, PROTOCOL_VERSION,
};
/// Minimum accepted attached client size.
@@ -72,6 +73,16 @@ pub(crate) enum ServerEvent {
terminal_id: String,
takeover: bool,
},
+ /// A direct terminal attach client requested scrollback movement.
+ ClientAttachScroll {
+ client_id: u64,
+ source: AttachScrollSource,
+ direction: AttachScrollDirection,
+ lines: u16,
+ column: Option<u16>,
+ row: Option<u16>,
+ modifiers: u8,
+ },
/// A client sent a resize message.
ClientResize {
client_id: u64,
@@ -431,6 +442,22 @@ fn client_read_loop(
terminal_id,
takeover,
},
+ ClientMessage::AttachScroll {
+ source,
+ direction,
+ lines,
+ column,
+ row,
+ modifiers,
+ } => ServerEvent::ClientAttachScroll {
+ client_id,
+ source,
+ direction,
+ lines,
+ column,
+ row,
+ modifiers,
+ },
ClientMessage::Hello { .. } => {
// Duplicate Hello — ignore.
continue;