With all the accessibility prompts in Mojave, I want to make sure that a certain prompt is visible to the user of our app and not hidden behind some window. I can enumerate all windows and retrieve information like:
kCGWindowIsOnscreen = 1;
kCGWindowLayer = 101;
kCGWindowMemoryUsage = 1248;
kCGWindowName = "Xcode";
kCGWindowNumber = 797;
kCGWindowOwnerName = Xcode;
kCGWindowOwnerPID = 320;
kCGWindowSharingState = 1;
kCGWindowStoreType = 1;
but how can I bring this window belonging to another app to the foreground?