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

# preventWindowOrdering()

Suppresses the usual window ordering in handling the most recent mouse-down event.

```
func preventWindowOrdering()
```

## Discussion

This method is only useful for mouse-down events when you want to prevent the window that receives the event from being ordered to the front.

---

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)