Hi David, David Guthrie schrieb: > Hi, > > I'm having an issue which with warping the mouse pointer on Mac OS X that is > generally expected, but behaves differently than on other platforms. > > That is, when you warp the mouse pointer using either of the warp functions > (GraphicsWindowCarbon uses CGDisplayMoveCursorToPoint), all input is frozen > for 0.25 seconds. When trying to implement a mouse look style mouse > movement, the normal method is to move the mouse pointer back to the center > of the screen even frame on other platforms, but doing this blocks all input > in OS X for a quarter second unless I call > > CGSetLocalEventsSuppressionInterval(0); > > The other method is to disassociate the mouse pointer position from the mouse > movement, but that solution won't work with the current osx window classes > because they track the mouse position, not its movement. > > I was going to submit a change adding the above line to GraphicsWindowCarbon, > and possible the Cocoa version, but it appears that this function is > deprecated in 10.6 in favor of > > CGEventSourceSetLocalEventsSuppressionInterval(...); > > > So, to conclude, I have two points to this post. > > 1. I think we should make this the default behavior so it will work the same > across platforms, unless there is another solution > > 2. I don't know how to implement this using the other function because I'm > not an expert on event sources, and I haven't really been able to make it > work. Does anyone more skilled than I in this area know how to make this > work or do you recommend I just use the older function for now?
There's really no documentation about using CGEventSourceSetLocalEventsSuppressionInterval correctly. I tried something along these lines, but it didn't work. CGEventSourceRef event_source_ref = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState); CGEventSourceSetLocalEventsSuppressionInterval(event_source_ref, 0.0); CFRelease(event_source_ref); So I think it's best we use the deprecated call to CGSetLocalEventsSuppressionInterval. The carbon implementation is full of deprecated calls :) cheers, Stephan _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org