-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Darwin
Milestone
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version)?
go version go1.6.2 darwin/amd64
- What operating system and processor architecture are you using (
go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/driusan/Code/Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1" - What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Ran x/exp/shiny/example/basic, scrolled mouse a single click with the scroll wheel on a mouse
- What did you expect to see?
Output similar to:
got mouse.Event{X:824, Y:452, Button:-1, Modifiers:0x0, Direction:0x0}
in the console.
- What did you see instead?
Nothing.
Adding some debug statements, it seems that the issue is that this line:
for delta := int(dy); delta != 0; delta--
in driver/gldriver/cocoa.go:/func mouseEvent/ isn't iterating at all when dy < 1 and the conversion is rounding to 0 when it casts to an int.
Changing it to:
for delta := int(math.Ceil(float64(dy))); delta != 0; delta--
if a little inelegant, fixed the issue for me.
dmitshur
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Darwin