<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindowController/synchronizeWindowTitleWithDocumentName()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindowController(im)synchronizeWindowTitleWithDocumentName"
  },
  "title" : "synchronizeWindowTitleWithDocumentName()"
}
-->

# synchronizeWindowTitleWithDocumentName()

Synchronizes the displayed window title and the represented filename with the information in the associated document.

```
func synchronizeWindowTitleWithDocumentName()
```

## Discussion

Does nothing if the window controller has no associated document or loaded window. This method queries the window controller’s document to get the document’s display name and full filename path, then calls [`windowTitle(forDocumentDisplayName:)`](/documentation/AppKit/NSWindowController/windowTitle(forDocumentDisplayName:)) to get the display name to show in the window title.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)