391 Commits

Author SHA1 Message Date
Mitchell Hashimoto
495925355a config: make the proxy icon documentation more detailed 2024-10-24 20:56:45 -07:00
johnseth97
c3efda93f4 Converted config declaration to an enum 2024-10-24 23:02:50 -04:00
johnseth97
8e223fdcd9 Reworked proxy icon, added config options. 2024-10-24 21:54:08 -04: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
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
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
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
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
227eda1d09 macos: notify core of mouse exit 2024-10-06 15:20:17 -10:00
Mitchell Hashimoto
e56cfbdc8b macos: set the proper app focus state 2024-10-06 10:06:17 -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
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
Roland Peelen
9e00eeff86 Review Feedback - formatting / docs 2024-10-02 10:33:36 -07:00
Roland Peelen
4aac4ecd98 Add hiding toggle, hook up to menu / shortcut 2024-10-02 10:33:36 -07:00
Mitchell Hashimoto
78b9636d15 macos: apply background opacity to quick terminal
Fixes #2331
2024-09-30 21:18:47 -07:00
Mitchell Hashimoto
ba9ae0c0be macos: only get fullscreen mode on AppKit 2024-09-30 10:37:33 -07:00
Mitchell Hashimoto
5f9d4f9733 macos: fullscreen=true with non-native fullscreen works
Fixes #1377
2024-09-30 10:02:50 -07:00
Mitchell Hashimoto
332e1a1494 macos: new FullscreenMode/Style architecture for fullscreen impls 2024-09-29 21:31:58 -07:00
Mitchell Hashimoto
4f9d49b380 macos: handle multiple monitors properly 2024-09-28 20:52:22 -07:00
Mitchell Hashimoto
bcdbb5899b macos: only define quick terminal configs for AppKit 2024-09-28 19:14:27 -07:00
Mitchell Hashimoto
11d5ec7dc1 config: support quick terminal position 2024-09-28 18:42:25 -07:00
Mitchell Hashimoto
1570ef01a7 rename slide to quick terminal 2024-09-28 15:20:35 -07:00
Mitchell Hashimoto
99e5e59491 macos: hook up the action for the slide terminal 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
1bd0999eef macos: add unhandled action 2024-09-27 10:18:01 -07:00
Mitchell Hashimoto
4ae20212bf libghostty: unified action dispatch
First, this commit modifies libghostty to use a single unified action
dispatch system based on a tagged union versus the one-off callback
system that was previously in place. This change simplifies the code on
both the core and consumer sides of the library. Importantly, as we
introduce new actions, we can now maintain ABI compatibility so long as
our union size does not change (something I don't promise yet).

Second, this moves a lot more of the functions call on a surface into
the action system. This affects all apprts and continues the previous
work of introducing a more unified API for optional surface features.
2024-09-26 22:00:11 -07:00
Mitchell Hashimoto
02d7e766e1 core: move password input into action enum 2024-09-25 11:43:48 -07:00
Mitchell Hashimoto
d6e9db4ec5 Merge pull request #2299 from ghostty-org/global-keybind
Keybind features: System-global keybindings and target-all-terminal keybindings
2024-09-24 21:01:32 -07:00
Mitchell Hashimoto
1b31663865 apprt/embedded: new_window can be called without a parent 2024-09-24 18:33:10 -07:00
Qwerasd
92d310a660 macOS: prevent ctrl-return key equivalent
macOS 15 adds this as a default key equivalent to show the context menu,
this is annoying, so we capture the event and tell macOS we handled it.
2024-09-23 16:55:11 -06:00
Mitchell Hashimoto
c63af5efaa macos: cannot call mouseEntered/Exited with blank NSEvent
Fixes #2283

macOS <= 14 crash with an invalid NSEvent error. macOS 15 seems to just
ignore the blank event. We just got lucky with this. Since we don't
override mouseEntered/Exited anymore we can remove this completely.

The regression was from: e89a4f74089b66c00043096589dc75fff5ab6674
2024-09-22 10:17:45 -07:00
Mitchell Hashimoto
261ce00552 apprt/macos,gtk: unfocused splits now highlight hovered links
Fixes #1547

The core change to make this work is to make the cursor position
callback support taking updated modifiers. On both macOS and GTK, cursor
position events also provide the pressed modifiers so we can pass those
in.
2024-09-21 15:16:14 -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
1ed1c73c1a macos: enable secure input on password input 2024-09-19 16:38:32 -07:00
Mitchell Hashimoto
c3d6356a87 macos: show secure input overlay when it is enabled 2024-09-19 16:24:42 -07:00
Mitchell Hashimoto
c0e0eff468 core: add toggle_secure_input keybinding 2024-09-19 10:20:30 -07:00
Mitchell Hashimoto
498804b571 macos: right-click actions on surface should target surface under click
Fixes #2263
2024-09-18 13:43:57 -07:00
Mitchell Hashimoto
359272a5f5 macos: start Sparkle after loading config 2024-09-10 21:54:40 -07:00