@@ -214,7 +214,7 @@ struct WebsiteView: View {
214214 windowState: windowState
215215 )
216216 . coordinateSpace ( name: dragCoordinateSpace)
217- . background ( shouldShowSplit ? Color . clear : Color ( nsColor: . windowBackgroundColor) )
217+ . background ( shouldShowSplit ? Color . clear : Color ( nsColor: browserManager . currentTab ( for : windowState ) ? . pageBackgroundColor ?? . windowBackgroundColor) )
218218 . frame ( maxWidth: . infinity, maxHeight: . infinity)
219219 . clipShape ( webViewClipShape)
220220 . shadow ( color: Color . black. opacity ( 0.3 ) , radius: 4 , x: 0 , y: 0 )
@@ -645,19 +645,19 @@ struct TabCompositorWrapper: NSViewRepresentable {
645645 if let lId = leftId, let leftTab = allKnownTabs. first ( where: { $0. id == lId } ) {
646646 // Force-create/ensure loaded when visible in split
647647 let lWeb = webView ( for: leftTab, windowId: windowState. id)
648- let pane = makePaneContainer ( frame: leftRect, isActive: ( activeSide == . left) , accent: accent, side: . left)
648+ let pane = makePaneContainer ( frame: leftRect, isActive: ( activeSide == . left) , accent: accent, side: . left, pageBackground : leftTab . pageBackgroundColor )
649649 containerView. addSubview ( pane)
650650 lWeb. frame = pane. bounds
651651 lWeb. autoresizingMask = [ NSView . AutoresizingMask. width, NSView . AutoresizingMask. height]
652652 lWeb. isHidden = false
653653 pane. addSubview ( lWeb)
654-
654+
655655 }
656656
657657 if let rId = rightId, let rightTab = allKnownTabs. first ( where: { $0. id == rId } ) {
658658 // Force-create/ensure loaded when visible in split
659659 let rWeb = webView ( for: rightTab, windowId: windowState. id)
660- let pane = makePaneContainer ( frame: rightRect, isActive: ( activeSide == . right) , accent: accent, side: . right)
660+ let pane = makePaneContainer ( frame: rightRect, isActive: ( activeSide == . right) , accent: accent, side: . right, pageBackground : rightTab . pageBackgroundColor )
661661 containerView. addSubview ( pane)
662662 rWeb. frame = pane. bounds
663663 rWeb. autoresizingMask = [ NSView . AutoresizingMask. width, NSView . AutoresizingMask. height]
@@ -706,16 +706,16 @@ struct TabCompositorWrapper: NSViewRepresentable {
706706 print ( " 🔍 [MEMDEBUG] updateCompositor() COMPLETE - Window: \( windowState. id. uuidString. prefix ( 8 ) ) , WebViews in container: \( webViewCount) , Total subviews: \( totalSubviews) " )
707707 }
708708
709- private func makePaneContainer( frame: NSRect , isActive: Bool , accent: NSColor , side: SplitViewManager . Side ) -> NSView {
709+ private func makePaneContainer( frame: NSRect , isActive: Bool , accent: NSColor , side: SplitViewManager . Side , pageBackground : NSColor ? = nil ) -> NSView {
710710 let cornerRadius : CGFloat = {
711711 if #available( macOS 26 . 0 , * ) { return 8 } else { return 8 }
712712 } ( )
713-
713+
714714 let v = NSView ( frame: frame)
715715 v. wantsLayer = true
716-
716+
717717 if let layer = v. layer {
718- layer. backgroundColor = NSColor . windowBackgroundColor. cgColor
718+ layer. backgroundColor = ( pageBackground ?? . windowBackgroundColor) . cgColor
719719
720720 // Create mask layer for uneven rounded corners
721721 let maskLayer = CAShapeLayer ( )
0 commit comments