Graphics artifact with transparent macOS window

I'm working on an AppKit-based macOS application that has a transparent pane as part of the window.  The view structure is an IB-based storyboard. The transparent pane has UI items embedded in it, one of which is an NSTableView (which also has a transparent background.  The cell view backgrounds are also transparent. 

After the application launches, the Table View leaves graphic artifacts (in some background layer) when the table is scrolled.

If the window is resized, the artifacts disappear (resizing seems to force a redraw).  If the table is then scrolled, the artifacts re-appear (again, at the last position of the actual objects).

The artifacts appear to be grayscale outlines or the edges of the objects (text or images)

This is only an issue when using transparency.  

Does anyone know what these artifacts are from, or perhaps how to get rid of them?  I assume that there is some redraw/refresh operation that is not occurring when it should (and is an issue with transparent backgrounds), but I've not yet been able to figure out how to properly trigger it.  

(macOS Monterey 12.0.1, Xcode 13.2)

  • Did you get any help attacking this issue? We are experiencing the same issue.

    Is it possible to disable drawing the "shadow outlines" we can see in the screenshots above?

Add a Comment

Replies

Calling [NSWindow invalidateShadow] will cause these artifacts to be cleared and shadows recomputed.