summaryrefslogtreecommitdiff
path: root/src/apprt/glfw.zig
AgeCommit message (Collapse)Author
2025-07-04Nuke GLFW from OrbitMitchell Hashimoto
This deletes the GLFW apprt from the Ghostty codebase. The GLFW apprt was the original apprt used by Ghostty (well, before Ghostty even had the concept of an "apprt" -- it was all just a single application then). It let me iterate on the core terminal features, rendering, etc. without bothering about the UI. It was a good way to get started. But it has long since outlived its usefulness. We've had a stable GTK apprt for Linux (and Windows via WSL) and a native macOS app via libghostty for awhile now. The GLFW apprt only remained within the tree for a few reasons: 1. Primarily, it provided a faster feedback loop on macOS because building the macOS app historically required us to hop out of the zig build system and into Xcode, which is slow and cumbersome. 2. It was a convenient way to narrow whether a bug was in the core Ghostty codebase or in the apprt itself. If a bug was in both the glfw and macOS app then it was likely in the core. 3. It provided us a way on macOS to test OpenGL. All of these reasons are no longer valid. Respectively: 1. Our Zig build scripts now execute the `xcodebuild` CLI directly and can open the resulting app, stream logs, etc. This is the same experience we have on Linux. (Xcode has always been a dependency of building on macOS in general, so this is not cumbersome.) 2. We have a healthy group of maintainers, many of which have access to both macOS and Linux, so we can quickly narrow down bugs regardless of the apprt. 3. Our OpenGL renderer hasn't been compatible with macOS for some time now, so this is no longer a useful feature. At this point, the GLFW apprt is just a burden. It adds complexity across the board, and some people try to run Ghostty with it in the real world and get confused when it doesn't work (it's always been lacking in features and buggy compared to the other apprts). So, it's time to say goodbye. Its bittersweet because it is a big part of Ghostty's history, but we've grown up now and it's time to move on. Thank you, goodbye. (NOTE: If you are a user of the GLFW apprt, then please fork the project prior to this commit or start a new project based on it. We've warned against using it for a very, very long time now.)
2025-06-27core: con't copy App and apprt.AppJeffrey C. Ollie
Besides avoiding copying, this allows consumers to choose to allocate these structs on the stack or to allocate on the heap. It also gives the apprt.App a stable pointer sooner in the process.
2025-06-24core, apprt: make runtimes implement resourcesDir directlyLeorize
2025-06-07apprt/glfw,gtk: noop undo/redo actionsMitchell Hashimoto
2025-05-29GTK: add action to show the GTK inspectorJeffrey C. Ollie
The default keybinds for showing the GTK inspector (`ctrl+shift+i` and `ctrl+shift+d`) don't work reliably in Ghostty due to the way Ghostty handles input. You can show the GTK inspector by setting the environment variable `GTK_DEBUG` to `interactive` before starting Ghostty but that's not always convenient. This adds a keybind action that will show the GTK inspector. Due to API limitations toggling the GTK inspector using the keybind action is impractical because GTK does not provide a convenient API to determine if the GTK inspector is already showing. Thus we limit ourselves to strictly showing the GTK inspector. To close the GTK inspector the user must click the close button on the GTK inspector window. If the GTK inspector window is already visible but is hidden, calling the keybind action will not bring the GTK inspector window to the front.
2025-05-15Handle check_for_updates as unimplemented actionAaron Ruan
2025-05-09input: remove `physical_key` from the key event (all keys are physical)Mitchell Hashimoto
2025-05-09apprt/glfw: buildsMitchell Hashimoto
2025-05-01Binding for toggling window float on top (macOS only)Mitchell Hashimoto
This adds a keybinding and apprt action for #7237.
2025-04-21add toggle command palette bindingMitchell Hashimoto
2025-04-14gtk: implement bellLeah Amelia Chen
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2025-03-12apprt/glfw: move darwin enabled const out to top-levelMitchell Hashimoto
2025-03-12Lots of 0.14 changesMitchell Hashimoto
2025-03-06gtk: add separate close_window apprt actionLeah Amelia Chen
For *some* reason we have a binding for close_window but it merely closes the surface and not the entire window. That is not only misleading but also just wrong. Now we make a separate apprt action for close_window that would make it show a close confirmation prompt identical to as if the user had clicked the (X) button on the window titlebar.
2025-02-28Introduce `reset_window_size` keybinding and apprt actionMitchell Hashimoto
Related to #6035 This implements the keybind/action portion of #5974 so that this can have a binding and so that other apprts can respond to this and implement it this way.
2025-02-14Add tab title rename feature to macosAswin M Prabhu
2025-02-13apprt: require envmap for exec-based termioMitchell Hashimoto
Supercedes #5726
2025-02-11apprt/glfw: return false for unimplemented actionsMitchell Hashimoto
2025-02-11core: performAction now returns a boolJeffrey C. Ollie
This is to facilitate the `performable:` prefix on keybinds that are implemented using app runtime actions.
2025-02-11gtk(x11): set `WINDOWID` env var for subprocessesLeah Amelia Chen
`WINDOWID` is the conventional environment variable for scripts that want to know the X11 window ID of the terminal, so that it may call tools like `xprop` or `xdotool`. We already know the window ID for window protocol handling, so we might as well throw this in for convenience.
2025-01-10apprt/gtk: add toggle_maximize keybind and window-maximize config optionAdam Wolf
2025-01-08close_tab keybind (gtk apprt only) (#4033)Sabarigirish Manikandan
Title. Adds a close_tab keybind that essentially behaves the exact same as clicking the tab close button on the tab bar.
2025-01-04Move app quit to apprt actionMitchell Hashimoto
This changes quit signaling from a boolean return from core app `tick()` to an apprt action. This simplifies the API and conceptually makes more sense to me now. This wasn't done just for that; this change was also needed so that macOS can quit cleanly while fixing #4540 since we may no longer trigger menu items. I wanted to split this out into a separate commit/PR because it adds complexity making the diff harder to read.
2025-01-02tweaks to window positionMitchell Hashimoto
2025-01-02chore: rename window-position-{x,y} to window-initial-position-{x,y}Adam Wolf
2025-01-02apprt/glfw: handle setting initial window position when window isAdam Wolf
created
2025-01-02chore: add missing case in switch statementAdam Wolf
2025-01-02feat(linux): allow setting an intial start positionAdam Wolf
2024-12-11apprt/glfw: add noop keyboardLayout func to satisfy tests and buildsMitchell Hashimoto
2024-11-24config: support loading from "Application Support" directory on macOSKyaw
2024-11-22apprt: remove change conditional state actionMitchell Hashimoto
2024-11-22apprt/glfw: update to new reload config actionMitchell Hashimoto
2024-11-21apprt: add `config_change` actionMitchell Hashimoto
2024-11-19apprt: action to change conditional state, implement for embeddedMitchell Hashimoto
2024-11-13apprt: support a pwd change actionMitchell Hashimoto
2024-10-30apprt: rename set_bg/fg to "color_change" to report all color changesMitchell Hashimoto
2024-10-30apprt: propagate OSC10/11 (set term fore/background color) through to apprtCJ van den Berg
This is to allow the running apprt to set the UI theme to match the terminal application coloring.
2024-10-25apply review changesaxdank
2024-10-24gui: add move_current_tab actionaxdank
2024-10-18apprt/glfw: exit with invalid CLI argsMitchell Hashimoto
2024-10-18config: richer diagnostics for errorsMitchell Hashimoto
Rather than storing a list of errors we now store a list of "diagnostics." Each diagnostic has a richer set of structured information, including a message, a key, the location where it occurred. This lets us show more detailed messages, more human friendly messages, and also let's us filter by key or location. We don't take advantage of all of this capability in this initial commit, but we do use every field for something.
2024-10-09macos: change our minimum version to macOS 13Mitchell Hashimoto
macOS 12 is officially EOL by Apple and the project only supports officially supported versions of macOS. Once publicly released, users on older macOS versions will have to use older released builds.
2024-10-08apprt: implement key_sequence actionMitchell Hashimoto
2024-10-02Add action on Zig sideRoland Peelen
2024-09-28rename slide to quick terminalMitchell Hashimoto
2024-09-27core: fix up toggle_slide_terminal action for rebaseMitchell Hashimoto
2024-09-27bind: add toggle_tab_overview bindingPaul Berg
2024-09-26libghostty: unified action dispatchMitchell Hashimoto
First, this commit modifies libghostty to use a single unified action dispatch system based on a tagged union versus the one-off callback system that was previously in place. This change simplifies the code on both the core and consumer sides of the library. Importantly, as we introduce new actions, we can now maintain ABI compatibility so long as our union size does not change (something I don't promise yet). Second, this moves a lot more of the functions call on a surface into the action system. This affects all apprts and continues the previous work of introducing a more unified API for optional surface features.
2024-09-26core: remove more hasdeclsMitchell Hashimoto
2024-09-26core: more actionsMitchell Hashimoto