Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix code completion window visibility issues#354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lucasmotta wants to merge3 commits intoCodeEditApp:main
base:main
Choose a base branch
Loading
fromlucasmotta:fix/code-completion-window-visibility
Open
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,7 +84,7 @@ extension SuggestionController {
static func makeWindow() -> NSWindow {
let window = NSWindow(
contentRect: .zero,
styleMask: [.resizable, .fullSizeContentView, .nonactivatingPanel, .utilityWindow],
styleMask: [.borderless],
backing: .buffered,
defer: false
)
Expand All@@ -97,8 +97,10 @@ extension SuggestionController {
window.hasShadow = true
window.isOpaque = false
window.tabbingMode = .disallowed
window.hidesOnDeactivate =true
window.hidesOnDeactivate =false
window.backgroundColor = .clear
window.canHide = false
window.acceptsMouseMovedEvents = true

return window
}
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -103,7 +103,10 @@ public final class SuggestionController: NSWindowController {
/// Opens the window as a child of another window.
public func showWindow(attachedTo parentWindow: NSWindow) {
guard let window = window else { return }

super.showWindow(nil)
parentWindow.addChildWindow(window, ordered: .above)
window.orderFront(nil)

// Close on window switch observer
// Initialized outside of `setupEventMonitors` in order to grab the parent window
Expand All@@ -118,8 +121,6 @@ public final class SuggestionController: NSWindowController {
self?.close()
}

super.showWindow(nil)
window.orderFront(nil)
window.contentViewController?.viewWillAppear()
}

Expand All@@ -134,6 +135,12 @@ public final class SuggestionController: NSWindowController {
contentViewController?.viewWillDisappear()
}

// Clean up window observers
if let observer = windowResignObserver {
NotificationCenter.default.removeObserver(observer)
windowResignObserver = nil
}

super.close()
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp