I'm trying to get information about my status items window. I get the window number using this call: statusItem.button?.window?.windowNumber
With that number I try to determine if it visible or not.
On macOS 15, this works fine, however on macOS Tahoe the window number is bigger than UInt32
or its type alias CGWindowID
, causing a crash of my app (when converting from Int to UInt32). Somehow the window numbers were always in the 32-bit space.
I can only guess about the reasons for increase of the window number beyond the UInt32 bounds. I don't know how the windows are numbered, but something may not be going as expected here.
Anyone knows if this may be due to running in a virtual machine?