This commit is contained in:
Mitchell Hashimoto
2024-09-21 10:00:30 -07:00
parent f9bd009ce5
commit 7f56ea150d

View File

@ -60,7 +60,7 @@ extension Ghostty {
@EnvironmentObject private var ghostty: Ghostty.App @EnvironmentObject private var ghostty: Ghostty.App
// The visibility state of the mouse pointer // The visibility state of the mouse pointer
private var pointerVisibililty: BackportVisibility { private var pointerVisibility: BackportVisibility {
// If our window or surface loses focus we always bring it back // If our window or surface loses focus we always bring it back
if (!windowFocus || !surfaceFocus) { if (!windowFocus || !surfaceFocus) {
return .visible return .visible
@ -97,7 +97,7 @@ extension Ghostty {
.focusedValue(\.ghosttySurfaceView, surfaceView) .focusedValue(\.ghosttySurfaceView, surfaceView)
.focusedValue(\.ghosttySurfaceCellSize, surfaceView.cellSize) .focusedValue(\.ghosttySurfaceCellSize, surfaceView.cellSize)
#if canImport(AppKit) #if canImport(AppKit)
.backport.pointerVisibility(pointerVisibililty) .backport.pointerVisibility(pointerVisibility)
.backport.pointerStyle(surfaceView.pointerStyle) .backport.pointerStyle(surfaceView.pointerStyle)
.onReceive(pubBecomeKey) { notification in .onReceive(pubBecomeKey) { notification in
guard let window = notification.object as? NSWindow else { return } guard let window = notification.object as? NSWindow else { return }