diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/Host.zig | 3 | ||||
| -rw-r--r-- | dev/tui/tui.zig | 12 |
2 files changed, 4 insertions, 11 deletions
diff --git a/dev/Host.zig b/dev/Host.zig index 24df3895..a23c9ef5 100644 --- a/dev/Host.zig +++ b/dev/Host.zig @@ -28,9 +28,6 @@ pub const VTable = struct { /// Upgrade: this process exec'd as the pardes installed since, at /// the step's end (upgrade.zig); `pane` hears why if it cannot be. upgrade: ?*const fn (ctx: ?*anyopaque, pane: pardes.Pane.Id) void = null, - /// Whether a newer pardes is installed at the path this process - /// started from, to be said once (upgrade.zig): asked at a focus-in. - newer_build: ?*const fn (ctx: ?*anyopaque) bool = null, spawn: ?*const fn (ctx: ?*anyopaque, pane: pardes.Pane.Id, cwd: []const u8) void = null, pty_write: ?*const fn (ctx: ?*anyopaque, pane: pardes.Pane.Id, bytes: []const u8) void = null, pty_resize: ?*const fn (ctx: ?*anyopaque, pane: pardes.Pane.Id, cols: u16, rows: u16) void = null, diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 1f6b9a49..5ba31bd9 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -1274,7 +1274,6 @@ const Shell = struct { .detach = detach, .adopt = adopt, .upgrade = upgradeAsked, - .newer_build = newerBuild, .spawn = spawn, .pty_write = ptyWrite, .pty_resize = ptyResize, @@ -1392,12 +1391,6 @@ const Shell = struct { s.adoptions.ask(s.core, pane); } - /// A client's own build is not the session's to say (its core's host - /// is the session's, through the tape). - fn newerBuild(ctx: ?*anyopaque) bool { - return of(ctx).client == null and upgrade.newer(); - } - fn upgradeAsked(ctx: ?*anyopaque, id: pardes.Pane.Id) void { const pane = id.index(); const s = of(ctx); @@ -1739,7 +1732,10 @@ const Shell = struct { c.link.gone = true; return true; }, - .focus_in => s.feed(.{ .focus = true }), + .focus_in => { + s.feed(.{ .focus = true }); + if (s.client == null) upgrade.noticeNewer(s.core); + }, .focus_out => { s.feed(.pointer_leave); s.feed(.{ .focus = false }); |
