diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-02 14:24:33 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-02 14:24:33 +0300 |
| commit | 6c0bb273d5d5405a00985621b17e36f8b4d64609 (patch) | |
| tree | ceef5ea8adf337bf3c1e977b133e76cb763c6f1b /tests/support/mod.rs | |
| parent | cc88b3b8e5bb9f7d9f23ed6ae85a52fd7b5b9ed6 (diff) | |
feat: support independent multi-client tab views (#3526)
Diffstat (limited to 'tests/support/mod.rs')
| -rw-r--r-- | tests/support/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/support/mod.rs b/tests/support/mod.rs index 68337ade..b2dae4be 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -21,6 +21,7 @@ pub const SERVER_MESSAGE_PANE_SURFACE: u32 = 13; pub const SERVER_MESSAGE_SEMANTIC_NOTIFICATION: u32 = 14; pub const SERVER_MESSAGE_PANE_SURFACE_PATCH: u32 = 19; const CLIENT_MESSAGE_CLIENT_SHELL_PANE_INPUT: u32 = 13; +const CLIENT_MESSAGE_CLIENT_SHELL_FOCUS: u32 = 18; const CLIENT_MESSAGE_ENDPOINT_CONTROL: u32 = 20; pub fn register_spawned_herdr_pid(pid: Option<u32>) { @@ -387,6 +388,17 @@ pub fn send_client_shell_shift_enter(stream: &mut UnixStream, pane_id: &str) -> .map_err(|e| format!("flush client shell key: {e}")) } +pub fn send_client_shell_focus(stream: &mut UnixStream, focused: bool) -> Result<(), String> { + let mut payload = encode_varint_u32(CLIENT_MESSAGE_CLIENT_SHELL_FOCUS); + payload.push(u8::from(focused)); + stream + .write_all(&frame_message(&payload)) + .map_err(|e| format!("write client shell focus: {e}"))?; + stream + .flush() + .map_err(|e| format!("flush client shell focus: {e}")) +} + pub fn send_detach(stream: &mut UnixStream) -> Result<(), String> { let detach_payload = encode_varint_u32(4); let framed = frame_message(&detach_payload); |
