In document app, if the NSDocument becomes edited and "– Edited" label appears in title bar, the position of the traffic light buttons reset to default.
You can check this issue by sending updateChangeCount:NSChangeDiscardable message.
When this happens, no notification is being sent. hasUnautosavedChanges/isDocumentEdited are not KVO observable.
I can't find the workaround to resolve this issue. The only chance to do this without going into Private API is to override updateChangeCount: method and update titlebar's layout from this.
The other option is to re-layout title bar from within drawRect: (since system redraws it), but this solution is ugly.
Any ideas?