@@ -81,7 +81,7 @@ public final class SuggestionWidgetController: NSObject {
8181 return it
8282 } ( )
8383
84- private lazy var panelWindow = {
84+ private lazy var sharedPanelWindow = {
8585 let it = CanBecomeKeyWindow (
8686 contentRect: . init( x: 0 , y: 0 , width: Style . panelWidth, height: Style . panelHeight) ,
8787 styleMask: . borderless,
@@ -117,7 +117,7 @@ public final class SuggestionWidgetController: NSObject {
117117 return it
118118 } ( )
119119
120- private lazy var suggestionWindow = {
120+ private lazy var suggestionPanelWindow = {
121121 let it = CanBecomeKeyWindow (
122122 contentRect: . init( x: 0 , y: 0 , width: Style . panelWidth, height: Style . panelHeight) ,
123123 styleMask: . borderless,
@@ -146,7 +146,7 @@ public final class SuggestionWidgetController: NSObject {
146146 return it
147147 } ( )
148148
149- private lazy var chatWindow = {
149+ private lazy var chatPanelWindow = {
150150 let it = ChatWindow (
151151 contentRect: . zero,
152152 styleMask: [ . resizable] ,
@@ -202,10 +202,10 @@ public final class SuggestionWidgetController: NSObject {
202202
203203 Task { @MainActor in
204204
205- windows. chatWindow = chatWindow
205+ windows. chatPanelWindow = chatPanelWindow
206206 windows. tabWindow = tabWindow
207- windows. panelWindow = panelWindow
208- windows. suggestionWindow = suggestionWindow
207+ windows. sharedPanelWindow = sharedPanelWindow
208+ windows. suggestionPanelWindow = suggestionPanelWindow
209209 windows. fullscreenDetector = fullscreenDetector
210210 windows. widgetWindow = widgetWindow
211211
@@ -262,19 +262,19 @@ public extension SuggestionWidgetController {
262262
263263extension SuggestionWidgetController : NSWindowDelegate {
264264 public func windowWillMove( _ notification: Notification ) {
265- guard ( notification. object as? NSWindow ) === chatWindow else { return }
265+ guard ( notification. object as? NSWindow ) === chatPanelWindow else { return }
266266 Task { @MainActor in
267267 await Task . yield ( )
268268 store. send ( . chatPanel( . detachChatPanel) )
269269 }
270270 }
271271
272272 public func windowDidBecomeKey( _ notification: Notification ) {
273- guard ( notification. object as? NSWindow ) === chatWindow else { return }
273+ guard ( notification. object as? NSWindow ) === chatPanelWindow else { return }
274274 let screenFrame = NSScreen . screens. first ( where: { $0. frame. origin == . zero } ) ?
275275 . frame ?? . zero
276276 var mouseLocation = NSEvent . mouseLocation
277- let windowFrame = chatWindow . frame
277+ let windowFrame = chatPanelWindow . frame
278278 if mouseLocation. y > windowFrame. maxY - 40 ,
279279 mouseLocation. y < windowFrame. maxY,
280280 mouseLocation. x > windowFrame. minX,
@@ -289,7 +289,7 @@ extension SuggestionWidgetController: NSWindowDelegate {
289289 ) ,
290290 let event = NSEvent ( cgEvent: cgEvent)
291291 {
292- chatWindow . performDrag ( with: event)
292+ chatPanelWindow . performDrag ( with: event)
293293 }
294294 }
295295 }
0 commit comments