19 Commits

Author SHA1 Message Date
Mitchell Hashimoto
50019bc766 minor comment changes 2024-06-18 17:09:29 -04:00
Cameron Dart
92e16ccbf7 no early return 2024-06-10 18:23:06 -07:00
Cameron Dart
29fb70197c macos: surface focus follow mouse 2024-06-10 16:07:33 -07:00
Mitchell Hashimoto
25484d2ccc macos: set background opacity/blur on window controller not surface 2024-06-07 12:31:45 -07:00
Mitchell Hashimoto
d2adf0501c macos: ime coordinate needs to be converted from view to window coords
Fixes #1756

We previously converted from view to screen coordinates but if the view
doesn't take up the full window then the view coordinates are wrong. We
need to convert to window coordinates in the middle.
2024-05-10 20:45:51 -07:00
Mitchell Hashimoto
ca9689be46 renderer/metal: API to handle macOS display ID changing 2024-05-04 19:40:58 -07:00
Mitchell Hashimoto
e31e25f54d apprt/embedded: add draw now API 2024-05-04 14:49:49 -07:00
Mitchell Hashimoto
6854fe91ab macos: only process key equivalents if we're focused
Fixes #1581
2024-03-15 14:11:46 -07:00
Qwerasd
bd03b19679 style 2024-03-08 13:24:01 -05:00
Qwerasd
d1ac0aff39 feat(macOS): Paste copied files as absolute paths.
Previously files would be pasted as only the filename. This commit
introduces an extension to NSPasteboard which provides a method to
consistently get the string contents of a pasteboard so that the
behavior can stay the same anywhere where we need to do that.
2024-03-07 20:53:48 -05: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
Qwerasd
cf2968c186 fix(macOS): Prevent janky transition animation on DPI change 2024-02-05 15:48:02 -05:00
Qwerasd
7a4c97329e macOS: Add URL to documentation in comment 2024-02-05 15:41:33 -05:00
Qwerasd
e91e2d409b fix(macOS): Prevent incorrect scaling of the Metal layer after DPI change
Ref: https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/CapturingScreenContents/CapturingScreenContents.html#//apple_ref/doc/uid/TP40012302-CH10-SW27
2024-02-05 14:08:12 -05:00
Mitchell Hashimoto
62785d9e54 macos: report color scheme for surface to libghostty 2024-02-02 13:19:46 -08:00
Mitchell Hashimoto
81532c0b56 macos: support reading service result text into terminal 2024-01-21 17:26:41 -08:00
Mitchell Hashimoto
4dbd10c913 apprt/embedded: support asking for selection text, existence 2024-01-21 17:22:44 -08:00
Mitchell Hashimoto
4c9fc452b6 macos: register that we accept/send text types for services 2024-01-21 17:07:24 -08:00
Mitchell Hashimoto
487c22011c macos: make SurfaceView cross-platform! 2024-01-18 19:28:36 -08:00