109 Commits

Author SHA1 Message Date
Mitchell Hashimoto
69cc6d11dc macos: MetalView, render an MTKView 2023-10-24 15:27:14 -07:00
Jon Parise
d63c0df582 macos: always apply initial size to new windows
We would previously exit early for non-transparent windows, which
skipped the call to setInitialWindowSize().
2023-10-21 08:21:58 -07:00
Mitchell Hashimoto
6990c1572a macos: insertText should not include null char 2023-10-14 21:06:34 -07:00
Mitchell Hashimoto
f987a36fce macos: escape shell-sensitive characters on filepath drop 2023-10-04 10:49:32 -07:00
Mitchell Hashimoto
2aacf6e130 macos: support dropping file urls onto surfaces 2023-10-04 08:01:13 -07:00
Mitchell Hashimoto
ee832aa361 apprt/embedded: ghostty_surface_text function, remove _char 2023-10-04 07:56:56 -07:00
Mitchell Hashimoto
e471228f6b macos: surfaceview supports dropping file URLs, just logs for now 2023-10-03 22:40:56 -07:00
Mitchell Hashimoto
6249621d71 macos: support drag and drop with no windows 2023-10-03 22:03:04 -07:00
Mitchell Hashimoto
d5299fec25 macos: use SurfaceConfiguration everywhere instead of bare c struct 2023-10-03 22:00:56 -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
300ba32ad0 macos: enum does not need to be a string 2023-09-22 15:48:41 -07:00
Mitchell Hashimoto
1eb0dbb548 macos: more robust cursor visibility handling
Fixes #519

The core issue here was that `mouseEntered` was called AFTER
`cursorUpdate` (by Cocoa) so we were messing up our NSCursor state. To
fix this more robustly, all cursor state should ONLY be handled by
cursorUpdate and mouseEntered/Exit goes through that system now.
2023-09-22 15:47:08 -07:00
Mitchell Hashimoto
7f549c5b41 macos: detect mouseEntered/Exit on frame change 2023-09-21 09:42:17 -07:00
Mitchell Hashimoto
d12f07ceda macos: mouse tracking area should always send
Without this, non-first-responder views would not receive mouse
entered/exit events. This would break some of our mouse hiding state.
See comments for more info.
2023-09-21 09:30:42 -07:00
Mitchell Hashimoto
6cee9e57f6 macos: prevent mouseEntered/Exited processing if already in that state
See the comment in the code.

Fixes #494
2023-09-20 08:53:31 -07:00
Mitchell Hashimoto
724900f143 macos: implement setCursorVisibility 2023-09-14 19:37:30 -07:00
Mitchell Hashimoto
cb2931cb27 rename cursor shape to mouse shape for OSC 22 2023-09-14 11:12:17 -07:00
Mitchell Hashimoto
3356146bb4 macos: support cursor style 2023-09-14 10:40:40 -07:00
Mitchell Hashimoto
2b04a7114b macos: use the configured unfocused split opacity 2023-09-10 18:52:40 -07:00
Mitchell Hashimoto
8bec01f237 macos: disable hit testing for unfocused split rectangle 2023-09-10 16:02:09 -07:00
Mitchell Hashimoto
de564dad94 macos: fade unfocused splits
Fixes #353
2023-09-10 09:17:46 -07:00
Mitchell Hashimoto
e5cba11ad0 macos: key events for modifier-only keys 2023-09-09 09:22:15 -07:00
Mitchell Hashimoto
e2282f1f4d macos: zoomed splits put an emoji in the title bar 2023-09-02 16:33:33 -07:00
Mitchell Hashimoto
70bdc21d22 macos: support zoomed splits 2023-09-02 15:51:10 -07:00
Mitchell Hashimoto
1626c8cd3a macos: hacks for split focus to work correctly on macos 12 2023-09-02 09:15:50 -07:00
Mitchell Hashimoto
e0015a0d00 macos: hacks to grab surface focus on macOS 12
See comment in code.
2023-09-01 16:23:30 -07:00
Mitchell Hashimoto
52396304ff macos: begin syncing menuitem key equivalents 2023-08-30 22:45:29 -07:00
Mitchell Hashimoto
c71979804e apprt/embedded: ghostty_surface_binding_action can now run any action 2023-08-30 21:46:38 -07:00
Mitchell Hashimoto
79971c62a6 macos: pass around a base surface_config_s rather than a new tab 2023-08-18 09:09:43 -07:00
Thorsten Ball
d2dae7a696 macOS: inherit font size when creating new tab
This is one part of #281.
2023-08-17 20:56:56 +02:00
Mitchell Hashimoto
721087be76 macos: send the left/right status of modifier keys 2023-08-14 12:40:48 -07:00
Mitchell Hashimoto
d5df8aea9a apprt/embedded: handle repeat events 2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
1e1ad7deb9 macos: use the new self-hosted translation 2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
3d23f26326 input, macos: initial work on keymapper and macos usage of it 2023-08-11 12:01:58 -07:00
Mitchell Hashimoto
22296b377a Revert "Merge pull request #244 from mitchellh/alt-as-esc"
This reverts commit c139279d479682c17f63d9b57c2d56608d09d16a, reversing
changes made to 4ed21047a734d7c586debe0026e3b6ea90ed1622.

We do want to do this but this broke bindings.
2023-08-07 17:06:40 -07:00
Mitchell Hashimoto
67cbabd605 make keyboard modifiers left/right-aware throughout core 2023-08-07 14:33:56 -07:00
Mitchell Hashimoto
d895887361 macos: enable copy/paste menu items in "Edit" 2023-08-05 14:50:18 -07:00
Mitchell Hashimoto
b11734bd67 default the title to the ghostty emoji
This only happens if the shell hasn't reported a pwd AND title.
2023-08-04 11:11:15 -07:00
Mitchell Hashimoto
9a079bb5b9 background-blur-radius for macOS 2023-07-03 20:43:53 -07:00
Mitchell Hashimoto
338f89679d apprt: add C API for detecting background transparency per surface 2023-07-03 19:44:06 -07:00
Mitchell Hashimoto
de5468e214 scale x, speed up scrolling 2023-06-29 11:47:28 -07:00
Mitchell Hashimoto
32031701b8 core: do high precision scrolling Y calculations 2023-06-29 11:42:43 -07:00
Mitchell Hashimoto
9a40dc4630 macos: build scroll mods value 2023-06-29 11:06:34 -07:00
Mitchell Hashimoto
20f46d5c08 define precision scrolling and momentum structs, C API 2023-06-29 10:38:15 -07:00
Mitchell Hashimoto
e998e053b1 mac: fix split initial focus
When making a split, the window focus doesn't change so the new splits
were defaulting to "false" (not focused). Let's just assume when a
surface is created that it is in fact focused. This generally fixes the
issue.

If we ever programmatically create splits in background windows this
will probably fail so we should find a way on View init to detect if the
window has focus.
2023-05-27 14:37:00 -07:00
Mitchell Hashimoto
decaee61b2 apprt/embedded: support unmapped keys 2023-03-25 15:44:17 -07:00
Mitchell Hashimoto
f092cce69e macos: translate ASCII keys 2023-03-25 15:26:04 -07:00
Mitchell Hashimoto
c01e8337bd macos: reliable window focus tracking for surface 2023-03-15 21:29:20 -07:00
Mitchell Hashimoto
363a03a30d macos: explicitly free surface resource on split/tab close
We don't wait for Swift to garbage collect. We just free the expensive
stuff (our surface) immediately.
2023-03-15 21:11:52 -07:00