Mouse coordinate bug on Mac?

Hi Ben, thanks for bearing with me. For the time being a workaround may be possible after all. The one I’m hopeful for requires the modification of two lines in juce_MouseEvent.cpp. They are changing the initialization of the x and y members of MouseEvent at around line 43.

  x ((int) std::floor (pos.x)),
  y ((int) std::floor (pos.y)),

This stands a chance of becoming the official fix, so please see if it works for you.

This is going to work as long as we specify Component coordinates using integers, but eventually those may become floats too and then the only working approach will be using MouseEvent::position.

1 Like