Skip to content

Commit 74fdc91

Browse files
Merge pull request #416 from yanjunhui/fix/macos-background-color-rendering
Fix: macOS background color rendering using incorrect color
2 parents 7f7541a + 1b8a0eb commit 74fdc91

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Sources/SwiftTerm/Apple/AppleTerminalView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,9 @@ extension TerminalView {
766766
}
767767

768768
#if os(macOS)
769+
// NSRect.fill() uses NSColor (set via NSColor.set()/setFill()),
770+
// not CGContext's fill color. Must call setFill() before fill().
771+
backgroundColor.setFill()
769772
rect.fill(using: .destinationOver)
770773
#else
771774
context.fill(rect)

0 commit comments

Comments
 (0)