807 Commits

Author SHA1 Message Date
Mitchell Hashimoto
67bc9fa0bc macos: nuke the titlebar from orbit when hidden 2024-10-24 21:06:45 -07:00
Mitchell Hashimoto
495925355a config: make the proxy icon documentation more detailed 2024-10-24 20:56:45 -07:00
johnseth97
e11fb62627 Fixed type conversion garbage 2024-10-24 23:47:34 -04:00
johnseth97
6c37fe2c26 Fixed conversion error between string and enum 2024-10-24 23:06:18 -04:00
johnseth97
c3efda93f4 Converted config declaration to an enum 2024-10-24 23:02:50 -04:00
johnseth97
f78ddabc15 refactored proxyIconURLDidChange to pwdDidChange 2024-10-24 23:01:54 -04:00
Mitchell Hashimoto
a651dbf3bf macos: fix goto last tab 2024-10-24 19:58:13 -07:00
johnseth97
fc094ee924 Fixed formatting 2024-10-24 22:15:31 -04:00
johnseth97
7301afa83e Removed uneeded code 2024-10-24 22:12:29 -04:00
johnseth97
8e223fdcd9 Reworked proxy icon, added config options. 2024-10-24 21:54:08 -04:00
Mohammad Al-Ahdal
3c8d9ae5a3 Fix: aerospace no longer resizes quick terminal and instead treats it as float 2024-10-24 03:00:17 -06:00
Max
553687b5e2 feat: make too big tab indices go to last tab 2024-10-23 20:27:13 +02:00
Mitchell Hashimoto
df7120d130 macos: use notification to detect when quick terminal shows/hides
Fixes #2474
2024-10-23 10:14:11 -07:00
johnseth97
7f898ce01f Basic proxy icons showing
Removed changes that accidentally carried over from another local
branch.

Basic Proxy Icons showing
2024-10-23 00:40:38 -04:00
Ethan Johnson
1b6778b800 Merge branch 'ghostty-org:main' into macos-window-deocrations-rework 2024-10-21 17:43:37 -04:00
johnseth97
b1f0c490b3 Merge branch 'NSToolbar-Deprication-Warning-Fix' of github.com:johnseth97/ghostty into NSToolbar-Deprication-Warning-Fix 2024-10-21 08:56:01 -04:00
Ethan Johnson
a53b4f684e Merge branch 'ghostty-org:main' into macos-window-deocrations-rework 2024-10-19 20:40:44 -04:00
johnseth97
96a0ca613a Fixing deprecation warnings, experiencing new errors. 2024-10-19 18:53:29 -04:00
Mitchell Hashimoto
1134a9cbea Merge pull request #2461 from JoshuaBrest/main
feat: Update MacOS about dialog
2024-10-19 14:16:54 -07:00
Mitchell Hashimoto
85db4d0277 macos: personal nitpicks and improvements 2024-10-19 14:07:04 -07:00
Josh
cc42dc57b9 fix: add text-selection back in the about dialoge. 2024-10-19 11:52:12 -07:00
Josh
d291fcfd52 style: add line break in the caption of the about dialog. 2024-10-19 11:45:24 -07:00
Josh
4b08b3f8d8 refactor: hide buttons when URLs are invalid and change variable mutability and visibility. 2024-10-19 11:23:04 -07:00
Mitchell Hashimoto
70acb0d76e macos: clamp window size to screen size on screen parameter changes
Fixes #2462

This sets up a listener for screen parameter changes. This only triggers
when a screen is added, removed, or a parameter such as its resolution
changes. This doesn't trigger when a window is simply moved from one
screen to another.

On parameter change, we ensure that the window is within the bounds of
the screen. As an exception, if the window was previously already
outside the bounds of the screen, we don't move it back in.
2024-10-19 10:13:16 -07:00
Josh
42bf37af32 feat: Update about menu design to match macOS. 2024-10-19 00:31:43 -07:00
johnseth97
def3a62fb9 Modified window-decorations = none option on macos 2024-10-19 01:03:05 -04:00
Mitchell Hashimoto
a4e14631ef config: richer diagnostics for errors
Rather than storing a list of errors we now store a list of
"diagnostics." Each diagnostic has a richer set of structured
information, including a message, a key, the location where it occurred.

This lets us show more detailed messages, more human friendly messages, and
also let's us filter by key or location. We don't take advantage of
all of this capability in this initial commit, but we do use every field
for something.
2024-10-18 08:11:11 -07:00
Qwerasd
de16541bca macOS: fix quicklook position
Account for padding and properly calculate text baseline, since that is
the position that the NSView `showDefinition` method ultimately needs.
2024-10-15 15:40:15 -04:00
Mitchell Hashimoto
75b8dc19d4 Merge pull request #2430 from ghostty-org/push-qqxqmpquyyut
macos: retry focusing the quick terminal to handle focus on other screen
2024-10-09 15:25:55 -07:00
Mitchell Hashimoto
94d30eaea3 macos: retry focusing the quick terminal to handle focus on other screen
Fixes #2409

This is one of the weirder macOS quirks (bugs? who knows!) I've seen
recently. The bug as described in #2409: when you have at least two
monitors ("screens" in AppKit parlance), Ghostty on one, a focused app
on the other, and you toggle the quick terminal, the quick terminal
does not have focus.

We already knew and accounted for the fact that
`window.makeKeyAndOrderFront(nil)` does not work until the window is visible
and on the target screen. To do this, we only called this once the
animation was complete. For the same NSScreen, this works, but for
another screen, it does not.

Using one DispatchQueue.async tick also does not work. Based on testing,
it takes anywhere from 2 to 5 ticks to get the window focus API to work
properly. Okay.

The solution I came up with here is to retry the focus operation every
25ms up to 250ms. This has worked consistently for me within the first 5
ticks but it is obviously a hack so I'm not sure if this is all right.

This fixes the issue but if there's a better way to do this, I'm all
ears!
2024-10-09 15:13:54 -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
Mitchell Hashimoto
a2ba7b4948 macos: don't swallow flagsChanged events, breaks system bindings
Fixes #2419
2024-10-09 10:17:39 -07:00
Mitchell Hashimoto
8994a8c627 macos: implement key sequence UI 2024-10-08 21:58:53 -07:00
Mitchell Hashimoto
5c1ffbb642 apprt: implement key_sequence action 2024-10-08 21:55:00 -07:00
Mitchell Hashimoto
392875381a macos: become aware of new split directions left and up 2024-10-07 15:34:47 -10:00
Mitchell Hashimoto
163e6cccca macos: quick terminal window blur settings take effect properly
Fixes #2410
2024-10-07 14:58:47 -10: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
fe3f8439a7 macos: send mouse cursor position events for right mouse dragged
Fixes #2407
2024-10-07 10:50:04 -10:00
Mitchell Hashimoto
715df3f263 macos: global keybind event tap only handles events when app is inactive
Fixes #2403
2024-10-07 05:46:16 -10:00
Mitchell Hashimoto
227eda1d09 macos: notify core of mouse exit 2024-10-06 15:20:17 -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
e56cfbdc8b macos: set the proper app focus state 2024-10-06 10:06:17 -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
e3dd0edc4f macos: use local event listener to propagate modifier changes to all
Related to #1547

Concretely, if you are highlighting a link and then release the
modifier, the other surfaces will be notified of this change.
2024-10-05 10:33:15 -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
Mitchell Hashimoto
1ae9322959 macos: non-native fs keeps track of screen number for change screen comp
Fixes #2370

Comparing NSScreens directly was fragile. It appears that AppKit/Cocoa
can return different instances of NSScreen for the same screen for
unknown reasons between calls to windowDidChangeScreen. I don't fully
understand why this happens.

In any case, our comparison was not safe. Instad, we now keep track of
of the CGDirectDisplayID for each screen and compare those instead.
2024-10-05 06:21:30 -10:00
Mitchell Hashimoto
9971d7a93d macos: toggle_visibility needs to sync to the correct menu item 2024-10-05 06:05:13 -10:00
Mitchell Hashimoto
c973ca6e03 macos: move show/hide all terminal windows
I don't think "View" was the right place.

Also, the menu was incorrectly bound to the quick terminal variable.
2024-10-04 06:35:20 -10:00
Lucy Davinhart
a109b8d755 Implements initial-window=false for macOS
Closes https://github.com/ghostty-org/ghostty/issues/2361
2024-10-03 19:09:37 +01:00