Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
Hello!
I was messing around with Quartz Window Service and I came up with this:

Code:
  CFArrayRef listOfWindows = CGWindowListCopyWindowInfo(kCGWindowListExcludeDesktopElements | kCGWindowListOptionOnScreenOnly,kCGNullWindowID );
    
    NSLog(@"List of windows:%@",listOfWindows);

The NSLog returns several attributes about windows.
My question is:
A: How do I isolate apps with windows from apps without windows?
ex: The array contains "Menubar"...I know Menubar isn't a "real" app, how can I exclude stuff like this. I thought kCGWindowListExcludeDesktopElemets did this.
B: How can I take all the apps it lists and create sperate array's for each one... everything is in one big array with the app name and its properties, can I isolate each app into its own array with its own properties?

Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.