15 Commits

Author SHA1 Message Date
Mitchell Hashimoto
4ae20212bf libghostty: unified action dispatch
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-26 22:00:11 -07:00
pnodet
7ff9af1520 style(macos): cleanup trailing spaces 2024-08-21 21:53:09 +02:00
Robbie Vanbrabant
693a599084 macos: regain window focus on inspector toggle
Fixes #734

I don't know much about SwiftUI, but here's why I think this works.

- Moving the `inspectorVisible` logic to an `onChange` ensures the view
  has at least seen that change.
- The dispatch to the main thread is still necessary to ensure the view
  hierarchy has completely updated after `inspectorVisible`.

Note that this fix is to correctly regain focus. We still lose window
focus very briefly.
2024-06-14 19:22:50 +01:00
Mitchell Hashimoto
18dfb642f5 macos: plumb through the split divider color 2024-01-29 21:32:10 -08:00
Mitchell Hashimoto
6532ff73a8 macos: verify inspector is not nil before sending it to draw 2023-12-29 07:53:20 -08:00
Gregory Anders
dc7c313166 macos: pass split as a binding to SplitView
Fixes: https://github.com/mitchellh/ghostty/issues/833
2023-11-07 11:55:29 -06:00
Mitchell Hashimoto
fc549978b9 macos: update inspector size in draw call 2023-10-24 15:27:16 -07:00
Mitchell Hashimoto
5e2bed62b3 macos: terminal inspector control 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
92d172377e macos: don't do full surface-style key translation for imgui 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
b2fd3fae6c macos: proper title when focusing the inspector 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
52ccef3b8e macos: only re-render the inspector when requested 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
d50ff6ece7 macos: complete cimgui events 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
2c40183c3c macos: rendering basic imgui 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
f15aaf3b9e macos: use a MTKView subclass for the inspector 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
69cc6d11dc macos: MetalView, render an MTKView 2023-10-24 15:27:14 -07:00