Gregory Anders
2ee80a52df
macos: set window resizeIncrements when cell size changes
...
The resizeIncrements property is only modified when the cell size of the
focused window changes. If two splits have the same cell size then the
property is not modified when focusing between the two splits.
2023-10-26 20:27:58 -05:00
Mitchell Hashimoto
be46bea40f
macos: fix warning from xcode
2023-10-26 14:45:55 -07:00
Mitchell Hashimoto
1696cf76b6
macos: free inspector when it is hidden
2023-10-25 09:09:10 -07:00
Mitchell Hashimoto
fc549978b9
macos: update inspector size in draw call
2023-10-24 15:27:16 -07:00
Mitchell Hashimoto
5e2bed62b3
macos: terminal inspector control
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
29bbcbbf92
core: add input binding to control terminal inspector
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
92d172377e
macos: don't do full surface-style key translation for imgui
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
b2fd3fae6c
macos: proper title when focusing the inspector
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
52ccef3b8e
macos: only re-render the inspector when requested
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
d50ff6ece7
macos: complete cimgui events
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
2c40183c3c
macos: rendering basic imgui
2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
f15aaf3b9e
macos: use a MTKView subclass for the inspector
2023-10-24 15:27:14 -07:00
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
Jon Parise
17b63f7617
config: add quit-after-last-window-closed
...
Whether or not to quit after the last window is closed. This defaults
to false. Currently only supported on macOS.
2023-10-18 14:03:32 -07:00
Mitchell Hashimoto
4341428c18
macos: make xcode 14 compatible, do not use switch expr
2023-10-16 20:05:32 -07:00
Gregory Anders
f966a5a163
macos: add menu items to modify font size
...
Add a new "View" menu to the menu bar with items to increase, decrease,
or reset the font size.
2023-10-16 20:32:33 -05:00
Mitchell Hashimoto
6990c1572a
macos: insertText should not include null char
2023-10-14 21:06:34 -07:00
Gregory Anders
4681b95bb3
macos: force new window for "New Window" action
...
There is a setting in the macOS System Preferences called "Prefer tabs
when opening documents" (accessed through the userTabbingPreference
field of NSWindow) which, when set to "Always", makes the "New Window"
action open windows in tabs.
Ideally, this setting would be controlled on a per-app basis in macOS,
but unfortunately that is not the case. Because Ghostty explicitly
offers both "New Tab" and "New Window" actions, this user setting should
be ignored when creating new windows.
2023-10-09 09:20:52 -05:00
Mitchell Hashimoto
a040e807e8
macos: implement service provider
2023-10-04 12:11:23 -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
dc882edd31
macos: validation of dropped directory
2023-10-03 22:18:39 -07:00
Mitchell Hashimoto
96b8fbb84d
macos: support dropping folder with window
2023-10-03 22:07:58 -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
00cb572a5b
macos: change close confirmations to NSAlert
...
Fixes #560
2023-10-03 09:53:15 -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
f386f12e8a
macos: safeAreaInsets.top includes menu
2023-09-29 12:05:24 -07:00
Michael Dusan
1f30e4e2ed
macos: adjust fullscreen frame height for notch
...
The macOS desktop menu-bar grows in total height by adding extra padding
to deal with the physical notch found on various MacBook displays.
When config `macos-non-native-fullscreen = visible-menu` we apply
`safeAreaInsets.top` to reduce frame height.
2023-09-29 12:00:11 -07:00
Mitchell Hashimoto
16f5af8b32
macos: relable tabs when config is reloaded
2023-09-28 08:36:02 -07:00
Mitchell Hashimoto
0e4b91de88
macos: stylistic changes
2023-09-28 08:34:27 -07:00
Gregory Anders
137d24db9c
macos: display keybinding instead of index in tab label
2023-09-28 08:28:46 -07:00
Gregory Anders
1fbd5e5590
macos: add keyEquivalent overload to also return modifier string
2023-09-28 08:28:46 -07:00
Gregory Anders
4837d840f6
macos: create modifier flags as OptionSet instead of from array
...
Nit picky change, but the OptionSet class (which NSEvent.ModifierFlags
is an instance of) has an API for incrementally setting values without
needing to create an array.
2023-09-28 08:28:46 -07:00
Gregory Anders
8f75e83958
macos: rename indexTabs() to relabelTabs()
...
This is a better name because the tab label may not necessarily be an
index (if a user binds some non-numeric key, for instance).
2023-09-28 08:28:46 -07:00
Gregory Anders
59ba6fac2b
macos: add tab index labels
2023-09-28 08:28:46 -07:00
Mitchell Hashimoto
6be4e4d45d
Revert "macos: on Sonoma, manually add menu height padding for visible-menu"
...
This reverts commit 1dab2f9dd3bb19f8decc30826fd75d59bf412cc2.
2023-09-27 22:13:55 -07:00
Mitchell Hashimoto
3188056bb2
Merge pull request #565 from mitchellh/macos-fs-menu
...
macos: custom fullscreen menu item to respect non-native fullscreen
2023-09-27 18:43:13 -07:00
Mitchell Hashimoto
21b46bd612
macos: change text to "toggle full screen"
2023-09-27 18:41:30 -07:00
Mitchell Hashimoto
57213547cd
macos: custom fullscreen menu item to respect non-native fullscreen
...
Related to #392
2023-09-27 18:34:04 -07:00
Mitchell Hashimoto
1dab2f9dd3
macos: on Sonoma, manually add menu height padding for visible-menu
...
See the comment.
2023-09-27 18:17:35 -07:00
Mitchell Hashimoto
f4886bb80e
macos: read from clipboard uses UTF-8 encoded string, proper byte count
2023-09-25 17:26:23 -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