Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AppBundle/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.70</string>
<string>1.4.71</string>
<key>CFBundleVersion</key>
<string>90</string>
<string>91</string>
<key>LSUIElement</key>
<true/>
<key>LSMinimumSystemVersion</key>
Expand Down
11 changes: 11 additions & 0 deletions Sources/CodexNotesProbe/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,7 @@ struct WindowConfigurator: NSViewRepresentable {
private var codexActivationTimeoutWorkItem: DispatchWorkItem?
private let codexAvailabilityMonitor: CodexApplicationAvailabilityObserving
private let closeButtonHoverHintController = CloseButtonHoverHintController()
private let resizeCursorController = MainWindowResizeCursorController()
private var appliedLanguageRevision: String?
private var isInvalidated = false

Expand All @@ -1984,6 +1985,7 @@ struct WindowConfigurator: NSViewRepresentable {
languageRevision: languageRevision
)
refreshCloseButtonHoverHint(for: window)
refreshResizeCursorTracking(for: window)
return
}
if self.window != nil {
Expand Down Expand Up @@ -2044,6 +2046,7 @@ struct WindowConfigurator: NSViewRepresentable {
installFramePersistenceObservers(for: window)
appliedLanguageRevision = languageRevision
refreshCloseButtonHoverHint(for: window)
refreshResizeCursorTracking(for: window)
updateVisibility(frontmostApplication: NSWorkspace.shared.frontmostApplication)
}

Expand All @@ -2055,6 +2058,7 @@ struct WindowConfigurator: NSViewRepresentable {

func detach() {
closeButtonHoverHintController.detach()
resizeCursorController.detach()
cancelCodexActivationTimeout()
codexAvailabilityMonitor.stop()
if let activationObserver {
Expand Down Expand Up @@ -2109,6 +2113,11 @@ struct WindowConfigurator: NSViewRepresentable {
closeButtonHoverHintController.attach(to: closeButton, in: window)
}

func refreshResizeCursorTracking(for window: NSWindow) {
guard !isInvalidated, self.window === window else { return }
resizeCursorController.attach(to: window)
}

func refreshLocalizationIfNeeded(
for window: NSWindow,
languageRevision: String
Expand Down Expand Up @@ -2203,6 +2212,7 @@ struct WindowConfigurator: NSViewRepresentable {

private func orderOutMainWindow(_ window: NSWindow) {
closeButtonHoverHintController.cancelAndDismiss()
resizeCursorController.cancelAndRestore()
window.orderOut(nil)
}

Expand Down Expand Up @@ -2417,6 +2427,7 @@ struct WindowConfigurator: NSViewRepresentable {
languageRevision: languageRevision
)
context.coordinator.refreshCloseButtonHoverHint(for: window)
context.coordinator.refreshResizeCursorTracking(for: window)
}
}

Expand Down
Loading