windowNumber
The window number of the window’s window device.
Declaration
var windowNumber: Int { get }Discussion
Each window device in an application is given a unique window number—note that this isn’t the same as the global window number assigned by the window server. This number can be used to identify the window device with the order(_:relativeTo:) method and in the AppKit function NSWindowList.
If the window doesn’t have a window device, the value of this property is equal to or less than 0.