Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Disable shadows since it will boost GPU usage of WindowServer
  • Loading branch information
intitni committed Jan 8, 2026
commit 7b65a0d1088e0cbe75c75371ded287c50851750e
19 changes: 11 additions & 8 deletions Core/Sources/SuggestionWidget/WidgetWindowsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ extension WidgetWindowsController {
)

if let suggestionPanelLocation = widgetLocation.suggestionPanelLocation {
print(suggestionPanelLocation)
windows.suggestionPanelWindow.setFrame(
suggestionPanelLocation.frame,
display: false,
Expand Down Expand Up @@ -705,7 +704,7 @@ public final class WidgetWindows {
defer: false
)
it.isReleasedWhenClosed = false
it.isOpaque = false
it.isOpaque = true
it.backgroundColor = .clear
it.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .transient]
it.hasShadow = false
Expand All @@ -723,10 +722,10 @@ public final class WidgetWindows {
defer: false
)
it.isReleasedWhenClosed = false
it.isOpaque = false
it.isOpaque = true
it.backgroundColor = .clear
it.level = widgetLevel(0)
it.hasShadow = true
it.hasShadow = false
it.contentView = NSHostingView(
rootView: WidgetView(
store: store.scope(
Expand All @@ -749,11 +748,11 @@ public final class WidgetWindows {
defer: false
)
it.isReleasedWhenClosed = false
it.isOpaque = false
it.isOpaque = true
it.backgroundColor = .clear
it.level = widgetLevel(2)
it.hoveringLevel = widgetLevel(2)
it.hasShadow = true
it.hasShadow = false
it.contentView = NSHostingView(
rootView: SharedPanelView(
store: store.scope(
Expand Down Expand Up @@ -783,10 +782,12 @@ public final class WidgetWindows {
defer: false
)
it.isReleasedWhenClosed = false
it.isOpaque = false
it.isOpaque = true
it.backgroundColor = .clear
it.level = widgetLevel(2)
it.hasShadow = true
it.hasShadow = false
it.menu = nil
it.animationBehavior = .utilityWindow
it.contentView = NSHostingView(
rootView: SuggestionPanelView(
store: store.scope(
Expand Down Expand Up @@ -881,6 +882,8 @@ class WidgetWindow: CanBecomeKeyWindow {
}

var hoveringLevel: NSWindow.Level = widgetLevel(0)

override var isFloatingPanel: Bool { true }

var defaultCollectionBehavior: NSWindow.CollectionBehavior {
[.fullScreenAuxiliary, .transient]
Expand Down