5 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e89a4f7408 macos: use macOS 15 pointerVisibility to show/hide cursor 2024-09-20 22:02:20 -07:00
Mitchell Hashimoto
2e74a0f9d4 macos: custom about window so we can be a first responder
Fixes #1052

This implements the about window as a custom window with a view
controller. This lets us implement the proper responder chain so that
our custom close window IBActions do the right thing.

This has an additional benefit that we can easily customize this window
going forward.
2023-12-17 15:51:04 -08:00
Mitchell Hashimoto
4b25356625 macos: manually show window to handle mission control behavior
Fixes #1018
Fixes #1020

This disables the "visibleAtLaunch" configuration in the xib and
manually shows the window when it loads. This lets us carefully control
what happens particularly when a window is full screen (native) and part
of Mission Control.

Previously, the behavior depended on the Settings.app "Prefer tabs
when opening documents" setting, but we didn't handle every behavior
correctly (see #1018 and #1020). I couldn't find a way to robustly
handle all cases because there are no published macOS APIs for
interacting with Mission Control...

Plus, terminals aren't really "documents" so it did confuse at least one
user that Ghostty would follow this configuration. We just incidently
did because we use native tabbing.

This PR takes full control into our own hands. Our behavior is now:

  - If a new window is created from a native fullscreen window, the
    new window is created into native fullscreen.

  - If a new tab is created from a native fullscreen window, the
    tab is added to the existing window and does not create a new space.

  - If a window or tab is created from a non-fullscreen window, the
    existing behaviors remain.
2023-12-07 22:44:47 -08:00
Mitchell Hashimoto
60713b46e9 macos: terminal window must subclass nswindow to receive events
Fixes #788
2023-11-02 22:00:33 -07:00
Mitchell Hashimoto
3018377389 macos: wip 2023-10-30 09:06:24 -07:00