CFTypeRef focusedWindow;
AXUIElementCopyAttributeValue(
frontMostApp, kAXFocusedWindowAttribute, (CFTypeRef *)&focusedWindow
);
in this case, How do I get window number from focusedWindow
?
Window number is like [[NSApp mainWindow] windowNumber]