Skip to content

Commit 71db7c4

Browse files
committed
Merge branch 'feature/macos-15-fixes' into develop
2 parents 5a2d17c + 7ab9ac8 commit 71db7c4

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

Core/Sources/SuggestionWidget/ChatPanelWindow.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ final class ChatPanelWindow: NSWindow {
3838
isReleasedWhenClosed = false
3939
isOpaque = false
4040
backgroundColor = .clear
41-
level = .init(NSWindow.Level.floating.rawValue + 1)
41+
level = widgetLevel(1)
4242
collectionBehavior = [
4343
.fullScreenAuxiliary,
4444
.transient,
4545
.fullScreenPrimary,
4646
.fullScreenAllowsTiling,
47+
.canJoinAllSpaces
4748
]
4849
hasShadow = true
4950
contentView = NSHostingView(

Core/Sources/SuggestionWidget/WidgetWindowsController.swift

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ public final class WidgetWindows {
633633
it.isOpaque = false
634634
it.backgroundColor = .clear
635635
it.level = .floating
636-
it.collectionBehavior = [.fullScreenAuxiliary, .transient]
636+
it.collectionBehavior = [.fullScreenAuxiliary, .transient, .canJoinAllSpaces]
637637
it.hasShadow = true
638638
it.contentView = NSHostingView(
639639
rootView: WidgetView(
@@ -659,8 +659,8 @@ public final class WidgetWindows {
659659
it.isReleasedWhenClosed = false
660660
it.isOpaque = false
661661
it.backgroundColor = .clear
662-
it.level = .init(NSWindow.Level.floating.rawValue + 2)
663-
it.collectionBehavior = [.fullScreenAuxiliary, .transient]
662+
it.level = widgetLevel(2)
663+
it.collectionBehavior = [.fullScreenAuxiliary, .transient, .canJoinAllSpaces]
664664
it.hasShadow = true
665665
it.contentView = NSHostingView(
666666
rootView: SharedPanelView(
@@ -693,8 +693,8 @@ public final class WidgetWindows {
693693
it.isReleasedWhenClosed = false
694694
it.isOpaque = false
695695
it.backgroundColor = .clear
696-
it.level = .init(NSWindow.Level.floating.rawValue + 2)
697-
it.collectionBehavior = [.fullScreenAuxiliary, .transient]
696+
it.level = widgetLevel(2)
697+
it.collectionBehavior = [.fullScreenAuxiliary, .transient, .canJoinAllSpaces]
698698
it.hasShadow = true
699699
it.contentView = NSHostingView(
700700
rootView: SuggestionPanelView(
@@ -739,8 +739,8 @@ public final class WidgetWindows {
739739
it.isReleasedWhenClosed = false
740740
it.isOpaque = true
741741
it.backgroundColor = .clear
742-
it.level = .floating
743-
it.collectionBehavior = [.fullScreenAuxiliary, .transient]
742+
it.level = widgetLevel(0)
743+
it.collectionBehavior = [.fullScreenAuxiliary, .transient, .canJoinAllSpaces]
744744
it.hasShadow = false
745745
it.contentView = NSHostingView(
746746
rootView: ToastPanelView(store: store.scope(
@@ -782,3 +782,9 @@ class CanBecomeKeyWindow: NSWindow {
782782
override var canBecomeMain: Bool { canBecomeKeyChecker() }
783783
}
784784

785+
func widgetLevel(_ addition: Int) -> NSWindow.Level {
786+
let minimumWidgetLevel: Int
787+
minimumWidgetLevel = NSWindow.Level.floating.rawValue
788+
return .init(minimumWidgetLevel + addition)
789+
}
790+

0 commit comments

Comments
 (0)