From 4c635f357adb95235429d8905b8598a2643b4f3b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 24 Oct 2026 13:55:12 -0300 Subject: drag 2/3: a pane's or column's grip let go past the window's edge opens it in a new window (Handover.zig) --- src/detached/server.zig | 3 ++- src/detached/wire.zig | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/detached') diff --git a/src/detached/server.zig b/src/detached/server.zig index eefce93e..d7dda6ba 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -201,7 +201,8 @@ pub const Session = struct { }, .search => |b| s.core.update(.{ .search = b }), // Ptys are read in the loop's own poll, not through the inbox. - .output, .eof, .files_changed, .fs_ready => {}, + // No hand_over host entry here (a session with no window): none comes. + .output, .eof, .files_changed, .fs_ready, .handed => {}, } } return batch.len != 0; diff --git a/src/detached/wire.zig b/src/detached/wire.zig index 82614b4f..9890dc1a 100644 --- a/src/detached/wire.zig +++ b/src/detached/wire.zig @@ -856,7 +856,7 @@ fn clientTag(msg: ClientMsg) ClientTag { return switch (msg) { .event => |ev| switch (ev) { // Machine-local reports and 9P requests belong to the session owner. - .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .tick => unreachable, + .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .handed, .tick => unreachable, inline else => |_, t| @field(ClientTag, @tagName(t)), }, inline else => |_, t| @field(ClientTag, @tagName(t)), @@ -986,7 +986,7 @@ pub fn encodeClient(out: []u8, msg: ClientMsg) Error![]const u8 { .pointer_leave => {}, .focus => |focused| try w.writeByte(@intFromBool(focused)), // See `clientTag`: no tag, so nothing to encode. - .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .tick => unreachable, + .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .handed, .tick => unreachable, }, } try finishMessage(&w, at); @@ -1137,7 +1137,7 @@ pub fn clientBound(msg: ClientMsg) usize { .paste => |b| b.len, .command => |line| line.len, // See `clientTag`: not on this wire in this direction. - .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .tick => unreachable, + .output, .eof, .exited, .lsp_resp, .pipe_resp, .search, .file_changed, .handed, .tick => unreachable, }, }; } -- cgit v1.3