Skip to content

refactor(windows): evaluate hoisting ghostty_app_t ownership #209

Description

@deblasis

ghostty_app_t is currently owned per-window. MainWindow constructs a
GhosttyHost that calls ghostty_app_new, so each window runs its own
libghostty app.

The macOS apprt has the inverse topology: one Ghostty app handle at the
app level, per-window surfaces registered against it. libghostty's C API
is designed for one app per process.

Two ways to align:

a) Full refactor. Move ghostty_app_t ownership out of GhosttyHost into
a dedicated app-level service. Per-window hosts hold only the surface
dictionary and callback delegates.

b) Minimal hoist. App.xaml.cs owns the single ghostty_app_t. Each
MainWindow constructs a GhosttyHost that wraps the shared handle plus
a per-window surface dictionary.

Which shape is more appropriate as app-level coordination surfaces appear
(command palette, global config reload, inspector, activation)?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions