diff options
Diffstat (limited to 'src/gui')
| -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(); |
