Commit Graph

7033 Commits (fe5fb6037478e710e51cb3b058a3bd80f7d58bb5)

Author SHA1 Message Date
Mitchell Hashimoto 2e0e8897e7
macos: avoid showing overlay if gained focus recently 2024-08-11 11:07:07 -07:00
Mitchell Hashimoto 975fc86866
Merge pull request #2076 from cryptocode/cc-pagelist-arrayhashmap
Improve resize performance by switching to AutoArrayHashMapUnmanaged
2024-08-11 10:36:19 -07:00
Mitchell Hashimoto 087b663787
Merge pull request #2082 from jcollie/gtk-resize-overlay-improvements
gtk: resize overlay improvements
2024-08-11 10:36:07 -07:00
Mitchell Hashimoto 4680c87c8b
macos: pause resize overlay until 500ms passes 2024-08-11 10:34:53 -07:00
Jeffrey C. Ollie f4bdf8d3a1
gtk: resize overlay improvements
* runtime changing of `resize-overlay` now works on GTK
* shorten function names in ResizeOverlay
* improve documentation
2024-08-11 12:23:43 -05:00
Mitchell Hashimoto 1cbeb264c9
Merge pull request #2077 from ghostty-org/resize-mac
macos: implement resize overlay
2024-08-10 21:23:25 -07:00
Mitchell Hashimoto 448382b49d
macos: add iOS field necessary 2024-08-10 21:08:59 -07:00
Mitchell Hashimoto 0e2012617e
macos: truncate tail of resize view 2024-08-10 21:01:29 -07:00
Mitchell Hashimoto bac258e6d2
renderer: fix underflow possibility in padding calculation 2024-08-10 21:00:04 -07:00
Mitchell Hashimoto 1c982278f3
macos: use dedicated overlay view for resize overlay 2024-08-10 20:56:21 -07:00
Mitchell Hashimoto 9cf247bb3e
macos: implement resize overlay
Implements the resize overlay configurations completely.
2024-08-10 20:17:33 -07:00
Mitchell Hashimoto 451cf69398
Merge pull request #2071 from jcollie/resize-overlay
gtk: add resize overlay
2024-08-10 15:07:09 -07:00
Mitchell Hashimoto 1c88377e97
apprt/gtk: small style tweaks for resize overlay 2024-08-10 15:06:44 -07:00
cryptocode 2e88ff1d05
Improve resize performance by switching to AutoArrayHashMapUnmanaged
I noticed that the HashMap iterator showed up prominently in Instruments when quickly
resizing Ghostty.

I think this is related to the [tombstone issue](https://github.com/ziglang/zig/issues/17851),
where the `next()` function has to skip unused meta-nodes.

In that same issue, Andrew is suggesting that the non-array hashmap might get deleted from the
standard library.

After switching to `AutoArrayHashMapUnmanaged`, iteration barely shows up anymore.

Deletion from the pin list should also be fast as swapRemove is used (order does not need to be preserved).

Question is if insertion performance is negatively affected, though I'm not seeing anything obvious.
Still, checking this PR for any perf regressions might be a good idea.

If this pans out, there are more places where this switch might be beneficial.
2024-08-10 23:54:04 +02:00
Mitchell Hashimoto 1ef3c79ba8
config: quit-after-last-window-closed should be true on Linux
This was the behavior on GTK prior to #2021 and I think it makes sense
as a default there.
2024-08-10 14:38:20 -07:00
Jeffrey C. Ollie 4dbd2fb639
move resize overlay code to a new file to keep the file size down 2024-08-10 14:59:05 -05:00
Jeffrey C. Ollie b55b3de05b
resize overlay: move all resize overlay code and data into a struct
Keepin´ the code clean by gathering all of the resize overlay
related data and code into a struct.
2024-08-10 14:44:28 -05:00
Jeffrey C. Ollie 8b919df1f5
resize-overlay: change default and delay → duration
Change the default to `after-first` and change `resize-overlay-delay` →
`resize-overlay-duration`.
2024-08-10 13:22:20 -05:00
Mitchell Hashimoto edea928117
Merge pull request #2057 from jcollie/xtwinops
[DRAFT] Implement the XTWINOPS (CSI t) control sequences that "make sense".
2024-08-10 11:21:49 -07:00
Mitchell Hashimoto 61ad6d10de
apprt/embedded: store title directly instead of get_title cb 2024-08-10 11:15:53 -07:00
Mitchell Hashimoto ccf62a4960
stylistic nitpicks 2024-08-10 11:03:56 -07:00
Mitchell Hashimoto aa5aad4344
Merge pull request #2075 from ghostty-org/extend
window-padding-color improvements
2024-08-10 10:51:49 -07:00
Mitchell Hashimoto 9db89dbf2c
config: make window-padding-color=extend default again 2024-08-10 10:41:36 -07:00
Mitchell Hashimoto f7f8c655df
renderer: remove alt-screen extend-always 2024-08-10 10:39:10 -07:00
Mitchell Hashimoto 9f06e74353
config: add window-padding-color=extend-always to force always 2024-08-10 10:34:12 -07:00
Mitchell Hashimoto 40b3d4c72e
config: clarify padding color default 2024-08-10 10:27:59 -07:00
Mitchell Hashimoto aeb3b64110
do not extend background for window-padding-color if powerline 2024-08-10 10:20:08 -07:00
Jeffrey C. Ollie 301826dfff
gtk: add resize overlay
This adds a transient overlay that shows the size of the surface
while you are resizing the window or the surfaces.
2024-08-09 22:58:33 -05:00
Mitchell Hashimoto 6cb85efc50
Merge pull request #2070 from ghostty-org/kitty-shm
terminal/kitty: shared memory size may be larger than expected for pages
2024-08-09 20:55:40 -07:00
Mitchell Hashimoto b368702a9d
terminal/kitty: shared memory size may be larger than expected for pages
The shared memory segment size must be a multiple of page size. This
means that it may be larger than our expected image size. In this case,
we trim the padding at the end.
2024-08-09 20:33:39 -07:00
Mitchell Hashimoto be88815a76
Merge pull request #2068 from ghostty-org/metal-fix
metal: cell bg pipeline no longer has vertex data, needs no vertex desc
2024-08-09 15:23:29 -07:00
Mitchell Hashimoto 861fe0379b
metal: cell bg pipeline no longer has vertex data, needs no vertex desc
This happened to work in releases somehow but Xcode debug builds would
catch this as an assertion. Our cell bg pipeline now uses the "full
screen vertex shader" which takes no parameters, so we don't need a
vertex descriptor.
2024-08-09 15:10:58 -07:00
Mitchell Hashimoto e4b8cac7ad
renderer/opengl: reset screen uniforms on font change
Fixes #2067
2024-08-09 10:26:46 -07:00
Mitchell Hashimoto 33d9c043ef
Merge pull request #2062 from qwerasd205/metal-optimizations
Metal optimizations
2024-08-08 18:56:09 -07:00
Qwerasd f47ab3e5b5 fix: add `Contents.bgCell` to avoid accidentally indexing with undersized ints 2024-08-08 21:02:26 -04:00
Qwerasd 740dce6e66 fix: promote dimensions to usize so cell_count doesn't overflow 2024-08-08 20:43:47 -04:00
Qwerasd bdbf5ad1c7 remove superfluous slicing syntax 2024-08-08 19:10:00 -04:00
Qwerasd e4ab550ea1 comment 2024-08-08 19:09:30 -04:00
Qwerasd 732483c08a renderer/metal: use memset to clear bg cell rows 2024-08-08 19:05:42 -04:00
Qwerasd d68906563e renderer/metal: properly support padding color = background (not extend) 2024-08-08 19:03:39 -04:00
Mitchell Hashimoto 71844a77b5
Merge pull request #2064 from jcollie/kitty-graphics-shared-memory
kitty graphics: add support for shared memory transfer medium
2024-08-08 14:36:34 -07:00
Mitchell Hashimoto c114979ee3
terminal/kitty: minor stylistic changes to shm 2024-08-08 14:35:30 -07:00
Mitchell Hashimoto 4e59c75b4c
Merge pull request #2063 from hqnna/main
Update iTerm2 Color Schemes dependency
2024-08-08 14:25:02 -07:00
Jeffrey C. Ollie e2fe6bf74b
kitty graphics: add support for shared memory transfer medium
Adds support for using shared memory to transfer images between
the CLI and Ghostty using the Kitty image protocol. This should be
the fastest way to transfer images if the CLI program and Ghostty are
running on the same system.

Works for single image transfer using `kitten icat`:

```
kitten icat --transfer-mode=memory images/icons/icon_256x256.png
```

However trying to play a movie with `mpv` fails in Ghostty (although it
works in Kitty):

```
mpv --vo=kitty --vo-kitty-use-shm=yes --profile=sw-fast --really-quiet video.mp4
```

`mpv` appears to be sending frames using the normal image transfer
commands but always setting `more_chunks` to `true` which results in an
image never being shown by Ghostty.

Shared memory transfer on Windows remains to be implemented.
2024-08-08 15:38:54 -05:00
hanna 329848ca60
update the zig cache hash for nix 2024-08-07 17:53:31 -07:00
hanna 785c08d36e
update iterm2-color-schemes to latest commit 2024-08-07 17:27:39 -07:00
Qwerasd e5241cb659 renderer/Metal: remove extraneous len arg from drawCellBgs 2024-08-07 18:30:44 -04:00
Qwerasd 3a58b89ef1 fix: use single triangle for metal post shader vertex 2024-08-07 18:17:49 -04:00
Qwerasd 76dc157675 fix tests 2024-08-07 18:02:11 -04:00
Qwerasd 6339f9bae9 renderer: metal shaders rework
- Significant changes to optimize memory usage.
- Adjusted formatting of the metal shader code to improve readability.
- Normalized naming conventions in shader code.
- Abstracted repetitive code for attribute descriptors to a helper
function.
2024-08-07 17:39:31 -04:00