Mouse initialization bugs

I’m having a few issues with the way MWorks initializes the mouse input.

  1. As we discussed offline, the hide mouse cursor functionality doesn’t work until the mouse is brought from the non-experiment monitor into the experiment monitor. This means I can’t hide the cursor on single-monitor rigs (e.g. an iMac that is being controlled remotely).

  2. I think related to #1 - when using the Wacom tablet, if the pen is touching the screen on startup MWorks does not begin registering x/y position until the pen is removed from the tablet and then replaced. This is super minor, and I probably would never have noticed if it wasn’t for the way our setup keeps the pen in a mold so that it’s always touching the surface.

  3. Again when using the Wacom tablet, a few times I’ve had MWorks think that the pointer is off the screen (y value around -40), even though the device is configured to only point to that monitor. I haven’t been able to reproduce it, confusingly.

None of these are holding up experiments right now, but #1 could conceivably at some point in the near future.

Hi Evan,

Thanks for reporting these issues. The mouse-hiding problem was already on my to-do list. I’ll try to take a look at it and the other problems in the next few days.

Cheers,
Chris

Hi Evan,

After some investigation, I think the root cause of issue #1 is that the cursor won’t hide unless the MWServer application is active (i.e. in the foreground). I added some code to force the app to the foreground before hiding the cursor, and that seems to have fixed the problem. This change will be in Monday’s nightly build. Please try it when you have a chance.

Unfortunately, my changes didn’t fix issue #2, and I’m not sure what to make of issue #3. It’s possible that these behaviors are a result of how the tablet driver delivers pointer events to the OS, in which case there may not be much that MWorks can do about them.

Chris

This change will be in Monday’s nightly build. Please try it when you have a chance.

Actually, hold off until tonight’s nightly build (or later). I need to make a few tweaks to get this working on all supported OS X versions.

Thanks,
Chris

I just tried it, and the cursor hides successfully.