diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:53:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:27:20 -0300 |
| commit | e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7 (patch) | |
| tree | 396414b8c5b9065a0a2dad6c8202df4a108cf7cd /src/gui/gui.zig | |
| parent | e19bdc79f0cc6e8521085c69ba6e22da24fce8a4 (diff) | |
| download | pardes-e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7.tar.gz pardes-e50c1b3fc928bf860bc6e91b0a2fea469f7e41e7.zip | |
host_io: a Restore's new core is restoreCore's (the clients that replicate the old one let go, the dump read and restored, its failure said once, the old core's pane and theme watches dropped), with both ponytail notes, where the tty and the window each wrote those steps out; each keeps its own ptys, pipes and views, and the tty's dump import goes with its one use
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/gui/gui.zig')
| -rw-r--r-- | src/gui/gui.zig | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 95df9fac..ecd9026f 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -2524,28 +2524,14 @@ fn localSession( daemon.watch(&shell, deliverNote); if (core.quit) break; // a session that ended does not restore into one if (core.takeRestore()) |rp| blk: { - // ponytail: a Restore replaces the core its clients replicate; - // they are let go, and attach again (as the tty's). - shell.peers.dropAll(core); - const bytes = filesystem.readRestore(gpa, rp, core.settings.dump_dir.get()) catch |err| { - core.reportError(core.active, "Restore", err); - break :blk; - }; - defer gpa.free(bytes); - const nc = dump.restore(core, bytes, rp) catch |err| { - core.reportError(core.active, "Restore", err); - break :blk; - }; + const nc = host_io.restoreCore(gpa, core, rp, &shell.peers, inotify_fd, &watches) orelse break :blk; pipe_tasks.cancelAll(io); queue.discardCompletions(); - // ponytail: a restored session is one view, the live window's: - // the others close. + // One view, the live window (host_io.restoreCore). shell.closeOtherWindows(); shell.gview = 0; shell.windowed = 1; shell.stopPtys(); - file_watch.unwatchAll(inotify_fd, &watches); - _ = file_watch.applyThemeEffect(core, gpa, inotify_fd, &watches, 0, false, false); clearNativeImages(g); g.presented_images.clearRetainingCapacity(); g.prepared_images.clearRetainingCapacity(); |
