Closed ricochet2200 closed 9 years ago
Well, that certainly seems wrong!
https://github.com/skelterjohn/go.wde/blob/master/xgb/events.go has how it'd done in linux, and I'm sure a similar approach would work for cocoa. That is, store the location of the mouse the last time it had ane vent.
I've looked at how it was done for Linux and copied the approach for OSX. Should be good to merge.
On Mac, calling
e.(wde.MouseMovedEvent).From
always yields an empty point with ordinates(0,0)
.The code shows that
From
is never set. I'm not familiar mouse events on Mac so I don't know if that value is provided or if it will need to be stored within this library.I'd be willing to help work on a fix if I can get a little direction on how this should be done. It seems if nothing else,
From
can be stored in the Window struct for darwin and updated on each MouseMovedEvent.Thanks!