<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindowDelegate/window(_:shouldPopUpDocumentPathMenu:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSWindowDelegate(im)window:shouldPopUpDocumentPathMenu:"
  },
  "title" : "window(_:shouldPopUpDocumentPathMenu:)"
}
-->

# window(_:shouldPopUpDocumentPathMenu:)

Asks the delegate whether the window displays the title pop-up menu in response to a Command-click or Control-click on its title.

```
@MainActor optional func window(_ window: NSWindow, shouldPopUpDocumentPathMenu menu: NSMenu) -> Bool
```

## Parameters

`window`

The window whose title the user Command-clicked or Control-clicked.

`menu`

The menu the window will display, if allowed. By default, its items are the path components of the file represented by `window`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to allow the display of the title pop-up menu; <doc://com.apple.documentation/documentation/Swift/false> to prevent it.

## See Also

[`representedURL`](/documentation/AppKit/NSWindow/representedURL)

The URL of the file the window represents.



---

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)