summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-03-18wip: testsvm-testsMitchell Hashimoto
Not meant for merging.
2025-03-18Update Adwaita version check for Box unref (#6796)Jeffrey C. Ollie
As of Adwaita 1.5.0, the GTK Box is not being properly unref'd when the parent window is closed. Update the conditional to account for this. Also add a couple of missing unref()s in errdefers. This fixes an issue where Ghostty would not properly quit after closing the last surface. https://github.com/ghostty-org/ghostty/discussions/3807 is related (though I'm not sure it's the exact same problem).
2025-03-18Update Adwaita version check for Box unrefGregory Anders
As of Adwaita 1.5.0, the GTK Box is not being properly unref'd when the parent window is closed. Update the conditional to account for this. Also add a couple of missing unref()s in errdefers.
2025-03-18gtk: remove c.zig (#6792)Jeffrey C. Ollie
It has been done.
2025-03-18translations(zh_CN): updateLeah Amelia Chen
2025-03-18translations: updateLeah Amelia Chen
2025-03-18gtk: remove c.zigLeah Amelia Chen
It has been done.
2025-03-18gtk: port ConfigErrorsWindow to dialogsLeah Amelia Chen
2025-03-18gtk: port inspector & key handling to zig-gobjectLeah Amelia Chen
2025-03-18ci(test/translations): ignore untranslated entriesLeah Amelia Chen
2025-03-18gtk: convert App to zig-gobject (#6787)Leah Amelia Chen
2025-03-17gtk: convert App to zig-gobjectJeffrey C. Ollie
2025-03-17gtk: convert Window (and some related files) to zig-gobject (#6775)Leah Amelia Chen
2025-03-17apprt/gtk: any preedit change should note a composing state (#6779)Mitchell Hashimoto
Fixes #6772 When typing Korean with the fcitx5-hangful input method, moving between graphemes does not trigger a preedit end/start cycle and instead just clears the preexisting preedit and reuses the started state. Every other input method we've tested up until now doesn't do this. We need to mark composing set to "false" in "commit" because some input methods on the contrary fail to ever call END. What is the point of start/end events if they are just ignored depending on the whim of the input method? Nothing. That's what. Its all a mess that GTK should be protecting us from but it doesn't and now its the app developer's problem. I'm frustrated because I feel like the point of an app framework is to mask this kind of complexity from the app developer and I'm playing whack-a-mole with input methods. Well, here's another whack. Let's see if it works.
2025-03-17apprt/gtk: any preedit change should note a composing stateMitchell Hashimoto
Fixes #6772 When typing Korean with the fcitx5-hangful input method, moving between graphemes does not trigger a preedit end/start cycle and instead just clears the preexisting preedit and reuses the started state. Every other input method we've tested up until now doesn't do this. We need to mark composing set to "false" in "commit" because some input methods on the contrary fail to ever call END. What is the point of start/end events if they are just ignored depending on the whim of the input method? Nothing. That's what. Its all a mess that GTK should be protecting us from but it doesn't and now its the app developer's problem. I'm frustrated because I feel like the point of an app framework is to mask this kind of complexity from the app developer and I'm playing whack-a-mole with input methods. Well, here's another whack. Let's see if it works.
2025-03-17gtk: address review commentsJeffrey C. Ollie
1. Remove usage of C header imports for gtk x11/wayland. 2. Move X11 C header imports to winproto_x11.zig 3. Clean up long line by breaking it up into multiple steps.
2025-03-17gtk: convert Window (and some related files) to zig-gobjectJeffrey C. Ollie
2025-03-17Update Debian 12 Dockerfile (#6776)Jeffrey C. Ollie
1. Automatically detect the required Zig version rather than using a hardcoded value. 2. Run `ghostty +version` after the build as a sanity check.
2025-03-17debian workflow: remove unused ZIG_VERSION argJeffrey C. Ollie
2025-03-17Update Debian 12 DockerfileJeffrey C. Ollie
1. Automatically detect the required Zig version rather than using a hardcoded value. 2. Run `ghostty +version` after the build as a sanity check.
2025-03-17gtk: update Tab to use zig-gobject (#6729)Jeffrey C. Ollie
2025-03-16Update iTerm2 colorschemes (#6755)Mitchell Hashimoto
Upstream revision: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/e348884a00ef6c98dc837a873c4a867c9164d8a0
2025-03-16deps: Update iTerm2 color schemesmitchellh
2025-03-16scroll: translate non-precision to precision (#6750)Mitchell Hashimoto
Some wheel mice are capable of reporting fractional wheel ticks. These mice don't necessarily report a corresponding precision scroll start event, at least in Wayland + GTK. We can treat all discrete (ie non-precision) events as the number of wheel ticks - for wheel mice, yoff will be "1.0" per tick, while precision wheel mice may report fractional values. This unifies handling of scroll events by normalizing all events to "pixels to scroll". We now report `mouse-scroll-multiplier` wheel or arrow events per wheel tick (or per accumulated cell height). This means that applications which subscribe to mouse button events will receive (by default) three wheel events per wheel tick. For precision scrolls, they will receive one wheel tick per line of scroll. In my opinion, this provides the best user experience while also allowing customization of how much a wheel tick should scroll Reference: https://github.com/ghostty-org/ghostty/discussions/6677
2025-03-16update zon2nix (#6728)Mitchell Hashimoto
Upstream is now mostly pure Zig and the build.zig.zon.* files are generated directly by zon2nix. The JSON file is no longer used as an intermediate file but is retained for downstream packager usage.
2025-03-16update zon2nixJeffrey C. Ollie
Upstream is now mostly pure Zig and the build.zig.zon.* files are generated directly by zon2nix. The JSON file is no longer used as an intermediate file but is retained for downstream packager usage.
2025-03-15build: update libvaxis and zf (#6752)Jeffrey C. Ollie
Fixes #6734
2025-03-15build: update libvaxis and zfJeffrey C. Ollie
Fixes #6734
2025-03-15scroll: translate non-precision to precisionTim Culverhouse
Some wheel mice are capable of reporting fractional wheel ticks. These mice don't necessarily report a corresponding precision scroll start event, at least in Wayland + GTK. We can treat all discrete (ie non-precision) events as the number of wheel ticks - for wheel mice, yoff will be "1.0" per tick, while precision wheel mice may report fractional values. This unifies handling of scroll events by normalizing all events to "pixels to scroll". We now report `mouse-scroll-multiplier` wheel or arrow events per wheel tick (or per accumulated cell height). This means that applications which subscribe to mouse button events will receive (by default) three wheel events per wheel tick. For precision scrolls, they will receive one wheel tick per line of scroll. In my opinion, this provides the best user experience while also allowing customization of how much a wheel tick should scroll Reference: https://github.com/ghostty-org/ghostty/discussions/6677
2025-03-15gtk: update Tab to use zig-gobjectJeffrey C. Ollie
2025-03-15termio, flatpak: implement process watcher with xev (#6658)Mitchell Hashimoto
This allows `termio.Exec` to track processes spawned via `FlatpakHostCommand`, finally allowing Ghostty to function as a Flatpak. Alongside this is a few bug fixes: * Don't add ghostty to PATH when running in flatpak mode since it's unreachable. * Correctly handle exit status returned by Flatpak. Previously this was not processed and contains extra status bits. * Use correct type for PID returned by Flatpak.
2025-03-15pkg/macos: clean up for Zig 0.14, consolidate C imports into one decl (#6736)Mitchell Hashimoto
Fixes #6727 The major change in this commit is to consolidate all the C imports in a single decl in main.zig. This is required for Zig 0.14. Without it, the problem in #6727 will happen. I was never able to minimize why this happens in order to open a Zig bug. Beyond this, I fixed the build.zig and build.zig.zon to work with Zig 0.14 so that we can test building `pkg/macos` in isolation. There are no downstream impacting changes in the build.zig files.
2025-03-15termio, flatpak: implement process watcher with xevLeorize
This allows `termio.Exec` to track processes spawned via `FlatpakHostCommand`, finally allowing Ghostty to function as a Flatpak. Alongside this is a few bug fixes: * Don't add ghostty to PATH when running in flatpak mode since it's unreachable. * Correctly handle exit status returned by Flatpak. Previously this was not processed and contains extra status bits. * Use correct type for PID returned by Flatpak.
2025-03-15pkg/macos: clean up for Zig 0.14, consolidate C imports into one declMitchell Hashimoto
Fixes #6727 The major change in this commit is to consolidate all the C imports in a single decl in main.zig. This is required for Zig 0.14. Without it, the problem in #6727 will happen. I was never able to minimize why this happens in order to open a Zig bug. Beyond this, I fixed the build.zig and build.zig.zon to work with Zig 0.14 so that we can test building `pkg/macos` in isolation. There are no downstream impacting changes in the build.zig files.
2025-03-15os: fix use of deprecated splitBackwards for Flatpak (#6733)Leah Amelia Chen
2025-03-14os: fix use of deprecated splitBackwards for FlatpakLeorize
2025-03-14build: mark most dependencies as lazy (#6726)Mitchell Hashimoto
Closes #6703 Lazy dependencies are only fetched if the build script would actually reach a usage of that dependency at runtime (when the `lazyDependency` function is called). This can save a lot of network traffic, disk uage, and time because we don't have to fetch and build dependencies that we don't actually need. Prior to this commit, Ghostty fetched almost everything for all platforms and configurations all the time. This commit reverses that to fetching almost nothing until it's actually needed. There are very little downsides to doing this[1]. One downside is `zig build --fetch` doesn't fetch lazy dependencies, but we don't rely on this command for packaging and suggest using our custom shell script that downloads a cached list of URLs (`build.zig.zon.txt`). This commit doesn't cover 100% of dependencies, since some provide no benefit to make lazy while the complexity to make them lazy is higher (in code style typically). Conversely, some simple dependencies are marked lazy even if they're almost always needed if they don't introduce any real complexity to the code, because there is very little downside to do so. [1]: https://ziggit.dev/t/lazy-dependencies-best-dependencies/5509/5
2025-03-14build: mark most dependencies as lazyMitchell Hashimoto
Lazy dependencies are only fetched if the build script would actually reach a usage of that dependency at runtime (when the `lazyDependency` function is called). This can save a lot of network traffic, disk uage, and time because we don't have to fetch and build dependencies that we don't actually need. Prior to this commit, Ghostty fetched almost everything for all platforms and configurations all the time. This commit reverses that to fetching almost nothing until it's actually needed. There are very little downsides to doing this[1]. One downside is `zig build --fetch` doesn't fetch lazy dependencies, but we don't rely on this command for packaging and suggest using our custom shell script that downloads a cached list of URLs (`build.zig.zon.txt`). This commit doesn't cover 100% of dependencies, since some provide no benefit to make lazy while the complexity to make them lazy is higher (in code style typically). Conversely, some simple dependencies are marked lazy even if they're almost always needed if they don't introduce any real complexity to the code, because there is very little downside to do so. [1]: https://ziggit.dev/t/lazy-dependencies-best-dependencies/5509/5
2025-03-14contributing: fix link to Translator's Guide (#6712)Leah Amelia Chen
2025-03-14gtk: convert Surface to zig-gobject (#6634)Jeffrey C. Ollie
Marking this is as draft because I want to test this further before saying that it's ready, but putting it out there for feedback.
2025-03-14fix: Use builtin `source_env_if_exists` for sourcing `.envrc.local` (#6717)Leah Amelia Chen
2025-03-14fix: ignore `.envrc.local`Uzair Aftab
2025-03-14fix: Use builtin `source_env_if_exists` for sourcing `.envrc.local`Uzair Aftab
2025-03-14feat: source local .envrc if it exists (#6715)Leah Amelia Chen
2025-03-14Update .envrcUzair Aftab
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-03-14fix: use bashism in `.envrc`Uzair Aftab
Co-authored-by: Leah Amelia Chen <github@acc.pluie.me>
2025-03-14feat: source `.envrc.local` if it existsUzair Aftab
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-03-14contributing: link to po/README_CONTRIBUTORS.mdLeah Amelia Chen
2025-03-14contributing: fix link to Translator's GuideLeah Amelia Chen
For some reason it pointed to the Contributor's Guide instead...
2025-03-13Replace mach-glfw with pkg/glfw (#6708)Mitchell Hashimoto
Closes #6702 This removes our mach-glfw dependency and replaces it with an in-tree pkg/glfw that includes both the source for compiling glfw as well as the Zig bindings. This matches the pattern from our other packages. This is based on the upstream mach-glfw work and therefore includes the original license and copyright information. The reasoning is stated in the issue but to summarize for the commit: - mach-glfw is no longer maintained, so we have to take ownership - mach-glfw depended on some large blobs of header files to enable cross-compilation but this isn't something we actually care about, so we can (and do) drop the blobs - mach-glfw blobs were hosted on mach hosts. given mach-glfw is unmaintained, we can't rely on this hosting - mach-glfw relied on a "glfw" package which was owned by another person to be Zig 0.14 compatible, but we no longer need to rely on this - mach-glfw builds were outdated based on latest Zig practices