4468 Commits

Author SHA1 Message Date
Mitchell Hashimoto
57d71450ab ctrl+click is handled as right-click (with various details)
If mouse capturing is enabled, we encode ctrl+click as ctrl+left-click
and DO NOT handle it as right click.
2024-06-30 19:44:51 -07:00
Mitchell Hashimoto
27fd05d112 apprt/gtk: conform to new mouse button API 2024-06-30 10:26:27 -07:00
Mitchell Hashimoto
32588a647f core: on right click, only create selection if point isn't in prev sel 2024-06-30 10:24:53 -07:00
Mitchell Hashimoto
a586eb9889 core: right-click press selects word 2024-06-30 10:22:34 -07:00
Mitchell Hashimoto
03f37087a5 mouse button callbacks returns bool for consumption 2024-06-30 09:42:15 -07:00
Mitchell Hashimoto
38c31e98f1 Merge pull request #1898 from ghostty-org/pressure-click
Mouse Pressure Support and QuickLook on macOS
2024-06-30 12:35:37 -04:00
Codey Oxley
73d3761f65 docs: Convert 'unfocused-split-fill' comments into doc block 2024-06-29 21:27:23 -04:00
Mitchell Hashimoto
db29c10bce apprt: scale coretext font size for quicklook properly 2024-06-29 11:43:13 -05:00
Mitchell Hashimoto
9a78563428 add TODO for branch 2024-06-29 11:29:02 -05:00
Mitchell Hashimoto
26735f0e05 apprt: convert selection info to a single struct and C API 2024-06-29 11:23:14 -05:00
Mitchell Hashimoto
80700d524d macos: add API to get selection top-left for quicklook 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
4c3fbffa4b macos: return valid selection range 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
d5f27245d4 macos: hacky API to get a CTFont for QuickLook 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
6faeb9ba40 core: mouse pressure state and callbacks 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
c3f78bc69d core: mouse within top/bottom 1 pixel should scroll selection
Fixes #1892

We previously required a negative y or y beyond the height of the window
but in a full screen scenario neither happen, so we add a one pixel
buffer instead where we still scroll.
2024-06-28 23:45:42 -05:00
Severus
49d10fb661 Fix issue 1667
When GTK 4.14 released, it used ngl by default with GSK_RENDERER. It
leads to destroy VAO state when we closed tab or detach tab. It handles
it incorrectly with opengl's engine.

This is a fix for that issue.
2024-06-28 23:35:55 +07:00
Justin Su
4de204659d fix a typo in Config.zig 2024-06-25 19:58:21 -04:00
Mitchell Hashimoto
37eb4082fe config: reorder increase font size so it works on macOS menu
Fixes #1826
2024-06-25 10:10:52 -07:00
Mitchell Hashimoto
1a22bc7f3b terminal: if cloned screen is subset of selection, select full screen
Fixes #1859
2024-06-25 09:45:36 -07:00
Mitchell Hashimoto
b62806360b terminal: add test for pagelist to clear styles 2024-06-24 20:58:11 -07:00
Mitchell Hashimoto
368960d76a use +% for overflow 2024-06-24 20:37:11 -07:00
Mitchell Hashimoto
44c75931b4 terminal: ref counted set count is const 2024-06-24 20:33:28 -07:00
Qwerasd
93b038f490 fix(RefCountedSet): add NeedsRehash error and fix PSL counting bug
Prevent bad input from causing repeated OutOfMemory errors by erroring
with NeedsRehash instead when there are unused dead IDs available.

Additionally, properly decrement PSL stats when reviving dead IDs.
2024-06-24 20:32:22 -07:00
Qwerasd
35793ee7cc page integrity checks: detect zombie styles 2024-06-24 20:32:22 -07:00
Qwerasd
6f732cca55 RefCountedSet: use usize for cap to allow up to max Id+1 2024-06-24 20:32:22 -07:00
Qwerasd
a7e6f1a070 fix(terminal/PageList): clear cells in truncated rows during clone
Previously this was a memory leak, styles and graphemes in these rows
were never reclaimed.
2024-06-24 20:32:21 -07:00
Mitchell Hashimoto
cb76fe6634 fix linux builds 2024-06-24 15:16:24 -07:00
Gordon Cassie
c967a35abb Fix some basic build errors. 2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
53423f1071 0.13 conversions 2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
d019bacb18 terminal: RefCountedSize should use usize for byte math
Related to #1873
2024-06-24 10:39:55 -07:00
Peter Cardenas
2cd4732cee 🔧 more lenient file matching for ghostty config 2024-06-23 14:29:09 -07:00
Mitchell Hashimoto
af132a3838 Merge pull request #1872 from qwerasd205/various-performance
Various Performance Changes
2024-06-23 09:51:21 -07:00
Mitchell Hashimoto
eebc7d4c3a small stylistic changes 2024-06-23 09:44:54 -07:00
Mitchell Hashimoto
3b36dbb53e font/coretext: cached fonts uses unmanaged arraylist 2024-06-22 20:56:23 -07:00
Mitchell Hashimoto
2607446235 font: add noop endFrame calls to all other shapers 2024-06-22 20:49:10 -07:00
Mitchell Hashimoto
9271fd50b6 cache_table and ref_counted_set work on 32-bit machines 2024-06-22 20:45:30 -07:00
Mitchell Hashimoto
71353d016e coretext shaper owns CFReleaseThread, works on both Metal and OpenGL now 2024-06-22 20:42:59 -07:00
Mitchell Hashimoto
4325dc51bc font: coretext shaper owns the cf release pool 2024-06-22 20:32:24 -07:00
Mitchell Hashimoto
3038cb4979 Move CFReleaseThread to os package 2024-06-22 20:15:59 -07:00
Mitchell Hashimoto
4aa130b0d1 CacheTable tests, style changes 2024-06-22 20:08:02 -07:00
Mitchell Hashimoto
6f43c01b76 renderer/opengl: invert cursor cell text when glyph is constrained
Fixes #1867
2024-06-18 14:59:49 -07:00
Mitchell Hashimoto
50019bc766 minor comment changes 2024-06-18 17:09:29 -04:00
Qwerasd
3f3db4896b add CFReleasePool handling to OpenGL renderer 2024-06-14 02:07:17 -04:00
Qwerasd
053500da38 shaper/coretext: update tests 2024-06-14 01:57:46 -04:00
Qwerasd
626ec2b5ac perf: introduce CFReleaseThread for running CoreFoundation releases
Some CoreFoundation objects, such as those produced by CoreText, have
expensive callbacks that run when they are released. By offloading the
CFRelease calls to another thread, we can avoid important threads being
blocked by unexpectedly expensive callbacks.

This commit also changes the way that the coretext shaper's run iterator
builds its string. Rather than using a CFMutableString, an ArrayList of
unichars is built which is passed to CFStringCreateWithCharactersNoCopy,
which is a lot more efficient since it avoids all the CoreFoundation
overhead.
2024-06-14 01:43:02 -04:00
Qwerasd
04896a14b4 perf(shaper/coretext): cache fonts between shape calls 2024-06-14 00:14:53 -04:00
Qwerasd
9741b3a18c perf: introduce RefCountedSet structure, use it for Style.Set 2024-06-13 22:59:03 -04:00
Cameron Dart
406d494e1d feat(gtk): focus follows mouse 2024-06-13 00:59:38 +00:00
Cameron Dart
fd786219d1 feat: focus-follows-mouse 2024-06-10 13:11:53 -07:00
Qwerasd
8d76b5f283 perf: introduce CacheTable strcture, use it for shaper cache 2024-06-10 13:58:35 -04:00