Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobile/app/x11.go: Support mouse events for X #20625

Open
veger opened this issue Jun 9, 2017 · 3 comments
Open

mobile/app/x11.go: Support mouse events for X #20625

veger opened this issue Jun 9, 2017 · 3 comments
Labels
mobile Android, iOS, and x/mobile
Milestone

Comments

@veger
Copy link

veger commented Jun 9, 2017

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

go version go1.8.3 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/veger/devel/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build373476887=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Click a mouse button in an X window

What did you expect to see?

I expect to see a mouse.Event on my event channel

What did you see instead?

I see a touch.Event instead.

@gopherbot
Copy link

CL https://golang.org/cl/45103 mentions this issue.

veger added a commit to veger/mobile that referenced this issue Jun 9, 2017
The received Xlib mouse events are converted to mouse.Events

The original touch.Event usage is dropped, it should be used when touch(screen) is supported to prevent confusion. Applicaiton can easily convert mouse events into touch event if they desire, as shown by the shiny (Windows) example application.

Fixes golang/go#20625

Change-Id: I9e76b40bbe25015fb163ba3d51b39a1f5cd17f54
@bradfitz bradfitz added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Apr 13, 2018
@ianlancetaylor
Copy link
Contributor

CC @eliasnaur @hyangah

@eliasnaur
Copy link
Contributor

Probably dup of #20593.

From reading the code, it seems to me that the intent for the "desktop" behaviour of a mobile/app program to be an emulator for the mobile behaviour. If that's true, converting from mouse events to touch events seems appropriate.

While mobile/app is mobile-centric, shiny is desktop-centric (and doesn't even run on mobiles). Somehow merging the two was probably the goal before work stalled.

@hyangah or @crawshaw might know more. I haven't worked much with the pure-Go mobile/app or Shiny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

5 participants