On Jul 12, 2005, at 9:17 AM, Jared McIntyre wrote:

Thanks.  It builds fine now.  Since you've been working on the key and mouse events, would it be difficult to add a view only mode? Its been requested by several people.

Okay, I've added a listen mode.  It's accessible from the connect dialog.

Also, where should I start looking in the code if I want to work on changing how often mouse position events are sent to the server?

Take a look at -[EventFilter mouseMoved:].  But doing this as you'd described earlier will be difficult, I think, because the frequency of mouse moved events isn't what's important for a laggy server - it's the acceleration ramp.  

Right now, the EventFilter passes mouseMoved events right through, possibly out of order (for example, if you press a modifier key, move the mouse, then press a key, and the modifier key press might have been part of mouse button emulation, the server would see the mouse moved event, then the modifier keypress, then the keypress).  One option would be to stick mouse moved events into the _pendingEvents array instead of shooting them straight through, and then only send the most recent one whenever a mouse down or keyboard event is received.  

The result would be that the mouse would be frozen until you pressed the button or hit a key.  Dragging would still work.

Doing this would break all of the emulation code, though - it assumes that only button presses, modifier presses, and key presses are in the event queue.

Also, this is something that would cause unexpected behavior for a lot of people (think rollovers, for example).  I don't think it should be an exposed option, and I'm not even sure it should be public code.