Hi Michael,
After some investigation into touchesMatchingPhase, I suspect the bug is very low priority if it is known at all; I wasn't able to find any bug reports online, so it appears we're the first ones running into it. I fiddled with it for a bit looking for a workaround, but haven't come up with much. As I see it, there are three options:
1) Ditch the finger count and use a modifier key to switch between pan and rotate. I've already hacked my dylib to do this as a temporary solution by commenting out the NSEventTypeBeginGesture and NSEventTypeEndGesture sections and inserting "fingersTouching = ([event modifierFlags]&NSShiftKeyMask ? 3 : 2);" above "if (fingersTouching == 2) {". While this solution is easy, I don't particularly like it because I had previously used the modifier key to scale the input up for situations where I wanted to move faster, and using multiple modifier keys at once is awkward.
2) On creation of a window, pass the window identifier/context to moi_touch. There may be a way for me to get the X11 window, and, from that, the NSWindow. At that point, I can add an NSResponder to the window which correctly overrides the various event handler methods (quickLookWithEvent, scrollWheel, touchesBeganWithEvent, touchesEndedWithEvent, etc.). I think this may be the "Right" way to do it; CGEventTap is fragile, considering we are currently using some magic undocumented stuff that is bound to break.
3) Write a native GUI, or perhaps go with a cross-platform GUI like wxWindows or some such. I don't know how much of MoI's code is windows specific, but I suspect that would be a lot of work.
Will
|