138 Commits

Author SHA1 Message Date
Mitchell Hashimoto
a2d2cfea59
macos: move drop implementation to separate extension 2025-01-11 19:27:36 -08:00
Mitchell Hashimoto
954c4d7b56
macos: swap out pointerVisible with NSCursor.setHiddenUntilMouseMoves
Fixes #2695

We had various issues with the pointerVisible property on macOS,
including the pointer not being hidden when it should be. Our only use
case today is mouse hide while typing so
NSCursor.setHiddenUntilMouseMoves is a better fit!
2024-11-15 19:05:51 -08:00
Jon Parise
dab3c68311 macos: use a constant for the corner radius 2024-11-15 11:19:00 -05:00
Jon Parise
69f396c252 macos: only round the opposing corner
Also, removing the padding from the window edge.
2024-11-15 11:16:25 -05:00
Jon Parise
07bff5f06d macos: reduce the corner radius to 3 pixels 2024-11-15 10:15:48 -05:00
Jon Parise
d9c9f44d6e macos: add rounded corners to the URL hover view
Also pad the view's position from the corners of the surface.
2024-11-15 09:27:42 -05:00
Mitchell Hashimoto
4d9143f634
macos: use the pwd apprt action to set the proxy icon URL 2024-11-13 13:11:32 -08: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
Mitchell Hashimoto
8994a8c627
macos: implement key sequence UI 2024-10-08 21:58:53 -07:00
Mitchell Hashimoto
d090384600
macos: fix non-AppKit builds 2024-09-21 10:22:14 -07:00
Mitchell Hashimoto
7f56ea150d
typos 2024-09-21 10:00:32 -07:00
Mitchell Hashimoto
f9bd009ce5
macos: unhide cursor on clipboard confirmation 2024-09-21 09:59:40 -07:00
Mitchell Hashimoto
0e1258b7fe
macos: pointer style uses macOS 15 helpers 2024-09-20 22:02:21 -07:00
Mitchell Hashimoto
e89a4f7408
macos: use macOS 15 pointerVisibility to show/hide cursor 2024-09-20 22:02:20 -07:00
Mitchell Hashimoto
df5cd719d6
macos: rename overlay config to indication 2024-09-19 20:00:46 -07:00
Mitchell Hashimoto
a513a02328
config: config to disable auto secure input and secure input overlay 2024-09-19 17:20:54 -07:00
Mitchell Hashimoto
9f03aae764
ios: disable secure input 2024-09-19 16:56:46 -07:00
Mitchell Hashimoto
c3d6356a87
macos: show secure input overlay when it is enabled 2024-09-19 16:24:42 -07:00
pnodet
7ff9af1520
style(macos): cleanup trailing spaces 2024-08-21 21:53:09 +02:00
Mitchell Hashimoto
2e0e8897e7
macos: avoid showing overlay if gained focus recently 2024-08-11 11:07:07 -07:00
Mitchell Hashimoto
4680c87c8b
macos: pause resize overlay until 500ms passes 2024-08-11 10:34:53 -07:00
Mitchell Hashimoto
0e2012617e
macos: truncate tail of resize view 2024-08-10 21:01:29 -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
eaa7a3f69c
macos: left hover needs to be higher Z so it takes mouse priority 2024-07-09 09:18:32 -07:00
Mitchell Hashimoto
4d3797c15e
macos: limit URL preview to a single line, ellipses in middle 2024-07-09 09:15:45 -07:00
Mitchell Hashimoto
571182fb60
macos: move OSC8 URL view to right if mouse is over it 2024-07-06 21:33:42 -07:00
Mitchell Hashimoto
cb790b8e39
macos: show URL on OSC8 hover 2024-07-06 10:25:12 -07:00
Mitchell Hashimoto
d5a23e78fe
macos: some disabled swiftui code that makes link tooltips show 2024-07-06 10:01:35 -07:00
Qwerasd
5df0935f82 update font_size to f32 in libghostty 2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
9aadf59ab1
macos,libghostty: font size is a u8 2024-03-27 20:53:03 -07:00
Mitchell Hashimoto
118b51157a
macos: more robust surface focus state detection
Fixes #1500

This overhauls how we do focus management for surfaces to make it more
robust. This DID somehow all work before but was always brittle and was
a sketchy play with SwiftUI/AppKit behavior across macOS versions.

The new approach uses our window controller and terminal delegate
system to disseminate focus information whenever any surface changes
focus. This ensures that only ONE surface ever has focus in libghostty
because the controller ensures it is widely distributed.
2024-02-11 09:19:13 -08:00
Mitchell Hashimoto
487c22011c
macos: make SurfaceView cross-platform! 2024-01-18 19:28:36 -08:00
Mitchell Hashimoto
01afa293c8
apprt/embedded: fix initialization on macOS 2024-01-18 08:55:03 -08:00
Mitchell Hashimoto
2568b4979b
macos: allow first click when non-focused to shift focus
This allows for example clicking on a split when focused on a different
app and having focus immediately jump to that split. Before this, you'd
have to click to focus the window, then second click to focus on the
split.
2024-01-17 20:30:34 -08:00
Mitchell Hashimoto
ed3f1df5f0
Merge pull request #1316 from qwerasd205/macos-file-handler
Added macOS file open handler
2024-01-16 18:56:34 -08:00
Mitchell Hashimoto
1005116f03
macos: detect error during surface initialization and render 2024-01-16 18:50:47 -08:00
Qwerasd
51f53aa9bf Added macOS file open handler 2024-01-16 16:26:21 -05:00
Mitchell Hashimoto
376345dcae
macos: detect renderer health failures and show error view 2024-01-16 11:27:18 -08:00
Mitchell Hashimoto
875a774d4b
macos: remove AppState and unify onto Ghostty.App cross-platform 2024-01-14 19:35:57 -08:00
Mitchell Hashimoto
eba3d5414d
macos: Ghostty.Config to store all config-related operations 2024-01-14 15:53:33 -08:00
Mitchell Hashimoto
afb1fea48b
macos: add Edit => Select All menu item
Fixes #1268
2024-01-09 20:54:23 -08:00
Mitchell Hashimoto
9bf13c6236
macos: set initial window size in controller window init
Fixes #1227
Fixes #1206

This moves the logic that respects `window-width` and `window-height` to
the controller window initialization. This is where it should've been
all the time but we previously didn't use a controller architecture so
we did our best to use heuristics in the view to do this.

This location now ensures that this only happens on window
initialization and only if we have one surface.
2024-01-05 09:42:50 -08:00
Mitchell Hashimoto
5e0e0b2bd4
macos: wait for window to become visible to set blur
Fixes #1181
2023-12-29 21:58:30 -08:00
Mitchell Hashimoto
40e882ff48
macos: invalid restorable state when surface is closed
Fixes #1177
2023-12-28 19:39:47 -08:00
Mitchell Hashimoto
181cfa1350
macos: notifications use surface UUID for lookups
Fixes #1162
2023-12-27 08:49:12 -08:00
Mitchell Hashimoto
98041940f0
macos: restore focused split on app restore 2023-12-26 14:45:27 -08:00
Mitchell Hashimoto
a321ef515d
macos: assign unique UUID per surface, store in app state 2023-12-26 14:24:05 -08:00
Mitchell Hashimoto
a8568306c9
macos: store pwd with save/restore state 2023-12-23 17:06:34 -08:00
Chris Marchesi
e1320be757
macos: handle middle click
This adds middle-click support to MacOS.

Very simple update, since everything else is in place to handle mouse
clicks in the embedded runtime already, we just needed to add the event
handlers in the UI.
2023-12-22 00:05:28 -08:00