Skip to content

x/exp/shiny: windriver: wrong mouse.Event coordinates for wheel events #18695

@ktye

Description

@ktye

What version of Go are you using (go version)?

go version go1.8rc1 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:/local/msys64/home/elmar
set GORACE=
set GOROOT=C:\local\go
set GOTOOLDIR=C:\local\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\local\msys64\tmp\go-build565066079=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2

What did you do?

See the discussion on golang-nuts:
https://groups.google.com/forum/#!topic/golang-nuts/F_mfbMCZyNU

What did you expect to see?

Mouse pointer position in mouse.Events should return the position relative to the window.

What did you see instead?

Mouse wheel events return the absolute position on the screen, not relative to the window.
The problem is only for windows and only for mouse wheel events (not normal movements).
Winapi lparam of the WM_MOUSEWHEEL message returns absolute positions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions