5188 Commits

Author SHA1 Message Date
Mitchell Hashimoto
0cf12cd88b input: make clear the open keybinding uses xdg-open 2024-10-14 09:32:38 -07:00
Mitchell Hashimoto
ccb97c6c33 Merge pull request #2417 from qwerasd205/misc-shaper-fixes
Renderer `rebuildCells` rework
2024-10-12 09:39:08 -07:00
Mitchell Hashimoto
6ce5f3f94b Merge pull request #2434 from ofseed/en-space
renderer: generalize the definition of "space"
2024-10-12 09:37:15 -07:00
Mitchell Hashimoto
862bdcb92a apprt/gtk: adw about dialog introduces in libadw 1.5.0
Fixes #2433
2024-10-12 09:35:09 -07:00
Yi Ming
0571c50d63 renderer: generalize the definition of "space" 2024-10-12 17:56:51 +08:00
Qwerasd
e4f4b708c9 font/shaper: explicitly skip invisible cells while shaping
Fixes a bug caused by the renderer logic assuming this behavior and not
advancing the run iterator when skipping foreground elements in cells
with the invisible flag set.
2024-10-11 13:50:16 -04:00
Mitchell Hashimoto
97abf3c370 font/noop: conform to new run struct type 2024-10-10 17:24:44 -07:00
Mitchell Hashimoto
c26d1cb28e config: add accidentally removed keybinding 2024-10-10 16:47:35 -07:00
Mitchell Hashimoto
745079cbb5 core: simplify scroll math, fix horizontal scroll direction on macOS
This simplifies the math for calculating scroll vectors based on mouse
scroll events. This was done to fix inverted horizontal scrolling on
macOS with natural scrolling enabled. Many assertions were added for
assumptions and our preconditions are clearly documented.

The preconditions are:

  * Apprt scroll offsets are negative down/left, positive up/right
  * Terminal vertical scroll is postive down, negative up (opposite
    since scroll for a terminal means how many rows to move down).
  * `Surface.scrollCallback` is always call with an apprt offset.
  * Apprt is responsible for implementing natural scrolling. Surface
    always assumes negative is down/left.
2024-10-10 16:24:16 -07:00
Mitchell Hashimoto
eec77e271c macos: change our minimum version to macOS 13
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-09 14:41:57 -07:00
Qwerasd
ca59367164 harfbuzz: fix tests to account for removal of null cells 2024-10-09 16:05:09 -04:00
Qwerasd
7de7bfa20e coretext: fix tests to account for removal of null cells 2024-10-09 16:00:57 -04:00
Qwerasd
0bb176d22c renderer: cleanup, reduce nesting, more comments 2024-10-09 15:53:02 -04:00
Qwerasd
b65ccd4598 test(coretext): add test for high plane padding sprite font behavior 2024-10-09 15:28:01 -04:00
Mitchell Hashimoto
e90dec04be core: support mouse button 6/7 for mouse reports
Fixes #2423

This corresponds to horizontal scroll on macOS and likely other mice.
2024-10-09 11:24:36 -07:00
Mitchell Hashimoto
4ffb1c8cf9 core: modifier-only keys do not reset pending key sequences
This allows nested key sequences to be used such as `ctrl+a>ctrl+b>c`.
2024-10-09 09:46:16 -07:00
Mitchell Hashimoto
b65a9ebc45 Merge pull request #2234 from jcollie/gtk-css-no-libadwaita
gtk: load css when libadwaita is not being used
2024-10-09 09:37:30 -07:00
Mitchell Hashimoto
5c1ffbb642 apprt: implement key_sequence action 2024-10-08 21:55:00 -07:00
Qwerasd
5730242596 coretext: don't emit 0 codepoints for special fonts 2024-10-08 23:47:35 -04:00
Qwerasd
7686cacde6 renderer, shaper: don't use null cells, handle bg and decorations separately
Significant rework that also removes a lot of unnecessarily duplicated
work while rebuilding cells in both renderers. Fixes multiple issues
with decorations and bg colors on wide chars and ligatures, while
reducing the amount of special case handling required.
2024-10-08 23:10:43 -04:00
Mitchell Hashimoto
8d7367fa64 input: return a K/V entry for the binding set get 2024-10-08 06:29:54 -10:00
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