> Am 20.08.2023 um 16:42 schrieb Austin Clow <austin_c...@clowvazar.com>:
> 
> I have been investigating how drawing works and am having a hard time 
> understanding where drawing begins in the object hierarchy. For example, 
> where does an NSWindow tell its decorations view to begin drawing its content 
> into the window? Thanks!


Window and view drawing start of in the static method +_handleAutodisplay: that 
gets triggered by the runloop. This informs all the registered windows to 
-_handleAutodisplay: themselves. There we check if the window actually needs to 
redraw and if this is the case call -displayIfNeeded which passes on this 
method to the window view. The window view is the decorations view you are 
interested in. From here on down the normal NSView drawing code gets used.

Hope this helps,
Fred

Reply via email to