How to show "unsaved" bullet in native macOS title bar?

I have a DocumentWindow with a native title bar that manages a FileBasedDocument.

Apple’s Human Interface Guidelines (link) say that, if AutoSave isn’t available (it isn’t in my app), then a window with unsaved changes should show a “bullet” symbol in its native title bar. Like this:


It’s simple enough to make the window listen to document changes.

However, I cannot figure out how to make JUCE show the actual bullet, and I cannot find anything on Google or this forum on that topic.

Please help!


I believe you want to use juce::ComponentPeer::setDocumentEditedStatus()


Brilliant, thank you! This works perfectly. Somehow I was unable to find it.

1 Like

I feel like there is a ton of stuff in ComponentPeer that is just never discussed on the forum, doesn’t have good documentation, isn’t used in any of the demos, and is the key to making apps appear REAAAALLY polished. setDocumentEditedStatus() being one of those things…