OS X 10.9 issues

 From:  Will (ALTAIC)
6339.11 In reply to 6339.10 
Hi again Michael,

Indeed you appear to be correct about #2; I verified by injecting code into XQuartz and calling [[NSApplication sharedInstance] windows], which failed to list client application windows. From browsing XQuartz code, I did see NSWindow being used, though I'm not sure in what way. The NSEvents being captured seemed to not have valid NSWindow references, so it's pretty conclusive that it's doing something else for client windows.

The situation for #1 seems to be the same as when we first looked into this: there is no known way to get device information from an NSEvent. The hasPreciseScrollingDeltas member function will differentiate a regular scroll wheel from a trackpad scroll, but since the magic mouse uses a touch sensor, it is indistinguishable from an actual trackpad (other than the number of fingers touching, but even then, I believe the magic mouse allows two finger scrolling as well; not sure how many fingers are reported via touchesMatchingPhase since I don't have a magic mouse). It is possible Apple attaches IOHID device information to the NSEvent in the various data fields (data1, data2, userData, etc.), but it would be undocumented and I haven't looked into it.

It seems #3 would be the way to go, though it's been a long time since I've used cross-platform UI kits, so I don't have much to add. IIRC, QT requires licensing fees for commercial use. Also, I remember wxWindows/wxWidgets being pretty good, and it's development looks to be active, but nowadays there are a lot of competitors which may or may not be better.

It a real shame the OS X input API is in such bad shape. I had hoped that the iOS input API (which is nice) would replace the API in OS X 10.9, but sadly it didn't. Hopefully Apple will get it together for 10.10.

Cheers and happy holidays,
Will