Re: [go-nuts] shiny: get mouse position relative to window

2017-01-17 Thread ktye
That's a good hint. I can confirm that on linux everything works as expected. The issue is only on windows. The problem is only with mouse wheel events: https://github.com/golang/exp/blob/master/shiny/driver/internal/win32/win32.go#L168 lparam is used to get the coordinates of the mouse events. Ho

Re: [go-nuts] shiny: get mouse position relative to window

2017-01-17 Thread Dave MacFarlane
That doesn't sound right to me. I just added a 'fmt.Printf("X: %v Y: %v\n", e.X, e.Y)' to the switch case handling mouse.Event in one of my shiny programs, and the mouse coordinates are reported relative to the top-left corner of the window. On Sat, Jan 14, 2017 at 5:59 AM, wrote: > How do I ge

[go-nuts] shiny: get mouse position relative to window

2017-01-14 Thread ktye78
How do I get the position for a mouse.Event in shiny using golang.org/x/mobile/event.mouse? The position returned is the global position on the screen, which changes if I move the window. The comments in https://github.com/golang/mobile/blob/master/event/mouse/mouse.go#L18 say it's: "// X and