Mitchell Hashimoto
880d7869a9
inspector: show modes
2023-10-24 15:27:16 -07:00
Mitchell Hashimoto
c8b9bea1e1
apprt: none has app/surface so tests pass
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
5a299e14e4
all threads are notified of inspector state, trigger render
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
afa08ffc02
initial work on basic inspector information
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
c1fade6e5b
apprt/embedded: also must render imgui multiple times
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
a1a398be4d
inspector: setup basic modes window (empty), dock
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
597c1a17ae
apprt/embedded: render in native dpi
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
55f681a0fd
inspector is scaled to native dpi
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
d65b29a537
apprt/embedded: render inspector
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
865bf7441c
apprt/gtk: initialize and run the inspector
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
7a30d1080e
core: hook up all the inspector activation state and such
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
dcb6eef9c4
apprt/gtk: different bg color for imgui widget
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
522d6b8ba1
apprt/gtk: destory the inspector properly on close
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
6a50a938d6
apprt/gtk: button to toggle inspector
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
199e1cae29
apprt/gtk: surface has inspector state
2023-10-24 15:27:15 -07:00
Mitchell Hashimoto
29bbcbbf92
core: add input binding to control terminal inspector
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
ddd7ff4bbb
apprt/gtk: use shared key => imgui key helper
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
775a734892
apprt/gtk: use new imgui opengl API
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
f3d99efcd8
apprt/gtk: imgui widget calls callback to populate imgui frame
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
c0ace7a29e
apprt/gtk: complete imgui backend
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
869e4133f1
apprt/gtk: can render imgui
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
a60f9eb9e6
apprt/gtk: empty inspector window
2023-10-24 15:27:13 -07:00
Mitchell Hashimoto
e74897fa01
config: add option to disable working directory inheritance
...
Fixes #618
2023-10-05 21:55:43 -07:00
Mitchell Hashimoto
ee832aa361
apprt/embedded: ghostty_surface_text function, remove _char
2023-10-04 07:56:56 -07:00
Mitchell Hashimoto
3046fb6dd7
core: textCallback to send text directly to the terminal
2023-10-04 07:50:05 -07:00
Mitchell Hashimoto
bb5246c65d
apprt/embedded: validate directory for wd
2023-10-03 22:13:36 -07:00
Mitchell Hashimoto
140afb395f
apprt/embedded: supporting setting working directory in config
2023-10-03 17:34:44 -07:00
Mitchell Hashimoto
769e7df675
apprt/gtk: implement default window size
2023-09-30 21:41:17 -07:00
Mitchell Hashimoto
a1a8aeb104
initial window size needs to take into account window chrome
2023-09-30 21:35:50 -07:00
Mitchell Hashimoto
cc8e1cd936
macos: support initial window size
2023-09-30 20:47:31 -07:00
Mitchell Hashimoto
604eeceb03
apprt/glfw: support window-width, window-height configurations
2023-09-30 20:10:08 -07:00
Mitchell Hashimoto
abf43ddfcc
apprt/gtk: change default cursor to text
2023-09-30 15:46:03 -07:00
Nathan Fisher
614a9775c6
Set the mouse pointer to "text" (an I-beam) when it is over the gl_area
...
which the terminal embeds into for the Gtk interface. Addresses https://github.com/mitchellh/ghostty/issues/596
2023-09-30 18:26:40 -04:00
Mitchell Hashimoto
6c69f0ef63
apprt/gtk: gtk-single-instance defaults to true only if desktop env
...
Fixes #473
A new config value for `gtk-single-instance = desktop` is now valid.
This value uses GTK single instance mode only if it detects Ghostty was
launched from a desktop environment (i.e. clicking on the icon) through
the `.desktop` Freedesktop file. Otherwise, it disables single instance.
This enables Ghostty to work well with the CLI and accept all the
typical CLI flags. It will make Ghostty launch slower from the CLI but I
think this is an acceptable tradeoff.
2023-09-30 08:46:39 -07:00
Mitchell Hashimoto
8f82f8cad6
apprt/embedded: adapt to new binding API
2023-09-29 22:13:34 -07:00
Mitchell Hashimoto
56b0cb51d5
apprt/gtk: previous_tab/next_tab action do not consume if there are no tabs
2023-09-29 22:12:38 -07:00
Tim Culverhouse
4f2d67d8f3
gtk(input): fix value used for lowercase lower_unicode
...
When converting keyval to the unshifted version, gdk_keyval_to_lower
returns a keyval type, not a unicode value. Convert this to unicode
before assigning to keyval_unicode_unshifted.
This fixes a bug where the incorrect keycode is sent in alternate
layouts with kitty keyboard on linux.
2023-09-29 06:36:03 -05:00
Mitchell Hashimoto
685495c896
apprt/gtk: make wide-style gtk tabs configurable
2023-09-28 08:54:15 -07:00
Nathan Fisher
dca0ddb7e1
(Gtk) Set tab labels to fill the available space, so that they will
...
divide up the avialable horizontal area instead of leaving a large
empty space in the tab bar.
2023-09-28 00:10:07 -04:00
Mitchell Hashimoto
8c4d25050a
apprt/gtk: detect keyboard modifier state for mouse events
2023-09-26 12:37:59 -07:00
Mitchell Hashimoto
510f0fe8f2
apprt/embedded: if a physical key input is a keypad key, keep it
2023-09-22 11:44:18 -07:00
Mitchell Hashimoto
d287e741b1
apprt/embedded: initialize unmodified keystate prior to use
...
Fixes #521
We were not initializing the dead key state. The dead key state is read
on all translation calls so it must be initialized to 0. This was
working before because coincidentally whatever the memory was always
worked (it probably didn't, but it never didn't work for someone to
notice).
In debug modes, Zig sets uninitialized memory to 0xAAAAAAAA. Amusingly,
this is a valid dead key state value that UCKeyTranslate ignores and
thus produces the correct value. Therefore, we were only seeing bugs in
release modes where the uninitialized memory was a bad value
(consistently 0x1 on my machine) causing the wrong key to come out.
We were getting lucky before, this has always been a bug.
2023-09-22 09:18:52 -07:00
Mitchell Hashimoto
ec7ab5b6a4
apprt/gtk: always set app ID, use G_APPLICATION_NON_UNIQUE instead
...
This makes the icon and title work on Wayland while retaining the
gtk-single-instance functionality.
2023-09-21 10:57:10 -07:00
Mitchell Hashimoto
1f7d567f29
apprt/gtk: use gtk_keyval_to_lower to get unshifted
...
map_keycode was not respecting the keyboard layout!
2023-09-19 17:44:18 -07:00
Mitchell Hashimoto
7748390a7e
apprt/gtk: async clipboard
2023-09-19 10:53:45 -07:00
Mitchell Hashimoto
5a02635d2c
macos: async style clipboard reading
2023-09-19 10:36:17 -07:00