5817 Commits

Author SHA1 Message Date
Jeffrey C. Ollie
a559ecf957 gtk: add adw or gtk class to top level windows 2024-10-08 11:17:33 -05:00
Jeffrey C. Ollie
bb109c435f gtk: fix window-theme=ghostty 2024-10-08 11:17:33 -05:00
Jeffrey C. Ollie
ab0a736089 gtk: load css when libadwaita is not being used 2024-10-08 11:17:32 -05:00
Leah Amelia Chen
fbc621a7d8 gtk: implement splitting leftwards and upwards 2024-10-07 18:19:27 -07:00
Mitchell Hashimoto
ed2cd6d436 macos: remove the ability to bind fn/globe
This was recently introduced a few days ago. Unfortunately, this doesn't
work as expected. The "function" modifier is not actually the fn key
but used by macOS to represent a variety of "functional" key presses.
This breaks other bindings such as #2411.

I can't find a source on the internet that reliably tells me how we
can detect fn key presses, but I do find a number of sources that tell
us we can't.
2024-10-07 14:36:12 -10:00
Mitchell Hashimoto
1b1589e0c6 apprt/gtk: only run window key events with tab overview shown 2024-10-07 13:17:21 -07:00
Mitchell Hashimoto
9c547dd8cd apprt/gtk: forward window key events to the focused surface 2024-10-07 13:06:35 -07:00
Mitchell Hashimoto
9e435f050e apprt/gtk: setup window key event infrastructure 2024-10-07 13:01:36 -07:00
Mitchell Hashimoto
eab6c0d4af gtk: only set initial window size if its the first terminal in a window
Fixes #2391
2024-10-07 09:46:13 -07:00
Mitchell Hashimoto
9e161758bb input: function is part of the binding mods 2024-10-07 05:52:20 -10:00
Mitchell Hashimoto
c7f83fcef8 gtk: notify core of cursor leave 2024-10-06 18:23:53 -07:00
Mitchell Hashimoto
65c907ddab core: negative x/y for cursor position indicates mouse exited viewport 2024-10-06 15:20:17 -10:00
Mitchell Hashimoto
bca0f76a7f Merge pull request #2399 from qwerasd205/broken-undercurl
Undercurl fixes/improvements
2024-10-06 15:02:11 -10:00
Mitchell Hashimoto
c49b896f22 Merge pull request #2398 from ghostty-org/app-focus
Make core app-focus aware, used to determine global keybind behavior
2024-10-06 10:47:46 -10:00
Mitchell Hashimoto
494fedca2f apprt/gtk: report proper app focus state 2024-10-06 13:31:03 -07:00
Mitchell Hashimoto
e56cfbdc8b macos: set the proper app focus state 2024-10-06 10:06:17 -10:00
Mitchell Hashimoto
8dc4ebb4f7 apprt/embedded: add ghostty_app_set_focus 2024-10-06 09:58:46 -10:00
Mitchell Hashimoto
bac1780c3c core: add app focused state, make App.keyEvent focus aware 2024-10-06 09:58:46 -10:00
Mitchell Hashimoto
2e0a514384 Merge pull request #2395 from ghostty-org/mods
Hyperlink state improvements (no mouse move, blurred splits/windows on macOS)
2024-10-06 09:40:49 -10:00
Mitchell Hashimoto
6785f886ad core: ghostty_app_key only handles global keybinds for now
This introduces a separate bug fixes #2396
2024-10-06 09:32:30 -10:00
Qwerasd
06a37f32be font/sprite: use offset curve approximation for undercurl 2024-10-06 01:43:11 -04:00
Qwerasd
c454ef627b fix(font/sprite): avoid underflow
There's a degenerate case where height < line_pos
2024-10-05 22:12:59 -04:00
Qwerasd
fd49fb7338 font/sprite: improve double underline legibility with min 2px gap
At small thicknesses, the legibility of the double underline is not
great when it's a 1px line, a 1px gap, and another 1px line.
2024-10-05 22:08:17 -04:00
Qwerasd
156f735f8d font/sprite: fix undercurl rendering
- Limit max amplitude relative to cell width to avoid being too wavy
- Fix application of xiaolin-wu's for anti-aliasing too always be at
least 1px thick.
- Fix height calculation to avoid clipping bottom of wave at small
sizes.
2024-10-05 22:01:43 -04:00
Mitchell Hashimoto
520c21d665 core: refresh hyperlink state without hacky cursorPosCallback
This fixes a longstanding piece of tech debt which caused all sorts of
bugs. Instead of trying to jam cursorPosCallback into a modsChanged
event we bring out the link refreshing into a dedicated method that is
shared.
2024-10-05 15:31:36 -10:00
Mitchell Hashimoto
e9f1fe327f cli/list-keybinds: output function modifier 2024-10-05 10:13:39 -10:00
Mitchell Hashimoto
b9fa6b1b83 config: more caveats for fn 2024-10-05 10:11:25 -10:00
Mitchell Hashimoto
f9e6d6efa6 macos: forward key events to the app when no windows exist 2024-10-05 10:05:06 -10:00
Mitchell Hashimoto
6fdfa9d491 Make the function/globe key available as a modifier on macOS 2024-10-05 09:39:55 -10:00
Mitchell Hashimoto
a278022e5d Bind ctrl+tab and ctrl+shift+tab by default
This matches default behaviors on native apps for macOS and GTK so we
should always bind it.
2024-10-05 09:34:46 -07:00
Mitchell Hashimoto
89fadfc202 renderer: fg/bg/cursor change must mark the screen as dirty
Fixes #2372
2024-10-04 06:58:50 -10:00
Mitchell Hashimoto
136dd8d0f9 Merge pull request #2376 from lucymhdavies/macos-initial-window-false
Implements initial-window=false for macOS
2024-10-04 08:47:49 -07:00
Lucy Davinhart
a109b8d755 Implements initial-window=false for macOS
Closes https://github.com/ghostty-org/ghostty/issues/2361
2024-10-03 19:09:37 +01:00
theprimeagen
f0591b4afb fix: scrolling with fraction produces different lines count due to @floor vs @trunc (-1 vs 1) 2024-10-03 11:19:41 -06:00
Jon Parise
865f8bd456 config: update project URL 2024-10-03 10:07:25 -04:00
Mitchell Hashimoto
1d09cdb382 Mouse movement events are sent with shift until a button is pressed
Ghostty was previously treating shift as a way to always stop mouse
reporting. That's true for mouse button events, but not for mouse
movement events. For mouse movement events, shift should be treated as
a modifier until a button (any mouse button) is pressed. Once it is
pressed, we pause mouse reporting until all buttons are released.

Found by @ldemailly. This matches the behavior of Kitty, Alacritty,
WezTerm, and xterm.
2024-10-02 17:08:37 -07:00
Mitchell Hashimoto
6940af2a16 Merge pull request #2365 from qwerasd205/underline-fixes
Underline Fixes
2024-10-02 15:49:03 -07:00
Mitchell Hashimoto
7aa2e2b24f renderer: some tweaks 2024-10-02 15:44:06 -07:00
Mitchell Hashimoto
be3ae56bc8 font: add stylistic variants for built-in font, fix naming convention
Fixes #2364

This adds the bold, italic, and bold italic variants of JB Mono so it is
built-in. This also fixes up the naming convention for the embedded font
files across tests and removes redundant embedded font files.
2024-10-02 15:17:18 -07:00
Qwerasd
dfc0894d5d fix(renderer): make all decorations and combining marks visible under cursor
Metal needed to be changed to account for wide chars having decorations
on the right half and OpenGL needed to account for multiple glyphs being
under the cursor at once (decorations and combining marks) as well as
wide chars.
2024-10-02 17:18:26 -04:00
Qwerasd
f9e2cb6aec fix(renderer): use 1-wide ul/st chars, ignore null shaper cells
This makes sure that underline styles are consistent and not stretched,
and avoids rendering overlapping text decorations or extraneous
background cells for the right halves of wide chars.
2024-10-02 16:38:31 -04:00
Mitchell Hashimoto
28ec11e52b docs updates 2024-10-02 10:52:59 -07:00
Roland Peelen
9e00eeff86 Review Feedback - formatting / docs 2024-10-02 10:33:36 -07:00
Roland Peelen
2dbd46096f Fix typo 2024-10-02 10:33:36 -07:00
Roland Peelen
24ba1a6100 Add action on Zig side 2024-10-02 10:33:36 -07:00
Mitchell Hashimoto
66f2d75ddd Change copy-on-select behavior to be more idiomatic for Linux
Fixes #2345

The new docs for `copy-on-select`:

Whether to automatically copy selected text to the clipboard. `true`
will prefer to copy to the selection clipboard if supported by the
OS, otherwise it will copy to the system clipboard.

The value `clipboard` will always copy text to the system clipboard
(for supported systems) as well as the system clipboard. This is sometimes
a preferred behavior on Linux.

Middle-click paste will always use the selection clipboard on Linux
and the system clipboard on macOS. Middle-click paste is always enabled
even if this is `false`.

The default value is true on Linux and false on macOS. macOS copy on
select behavior is not typical for applications so it is disabled by
default. On Linux, this is a standard behavior so it is enabled by
default.
2024-10-01 20:38:27 -07:00
Mitchell Hashimoto
46cbe59076 macos: quick terminal supports fullscreen
Fixes #2330

The quick terminal now supports fullscreen. The fullscreen mode is
always non-native due to the quick terminal being a titleless, floating
window.

When the quick terminal loses focus and animates out, it will always
exit fullscreen mode.
2024-09-30 21:07:16 -07:00
Mitchell Hashimoto
4b9a3aaaa2 Merge pull request #2337 from ghostty-org/nonnative
macOS: fullscreen implementation improvements
2024-09-30 20:17:10 -07:00
Mitchell Hashimoto
22b9f24978 macos: clarify comments, clean up notifications for fullscreen 2024-09-30 20:10:23 -07:00
Mitchell Hashimoto
045ecacd8c macos: fullscreen mode can be changed at runtime 2024-09-30 10:31:11 -07:00