Hey, I haven't yet tested your last patch. Right now I'm on 1e83d04214f27a79a4d4841772da946e24cbf21d as local root and it starts to have wired visual things like that: Before your last patches everything was fine. -- wbr, Kirill > On 14. Sep 2021, at 14:13, Alan Third wrote: > > On Tue, Sep 14, 2021 at 01:26:44PM +0200, Kirill A. Korinsky wrote: >> I have one bad news: it still exists but less often. >> >> I can reproduce it one time in 10 starts of my emacs. > > The *only* place that should modify FRAME_EXTERNAL_TOOL_BAR is > ns_set_tool_bar_lines, which should be called *every time* the number > of lines is changed. > > It would be nice to know what the value of FRAME_EXTERNAL_TOOL_BAR and > tool-bar-lines are when the toolbar is wrongly visible, because I > can't find a single location in the code that sets the visibility > without first checking FRAME_EXTERNAL_TOOL_BAR, and it should *always* > be set by ns_set_tool_bar_lines. > > *sigh* I've no idea. > > Attached is the nuclear option. If this doesn't work then > FRAME_EXTERNAL_TOOL_BAR is wrong. > > -- > Alan Third > <0001-A-further-fix-for-toolbar-visibility-problems-on-mac.patch>