I haven't seen this either, the solution depends on what platform you're 
trying to support. 

I have a package that does this, for Win32. If you're using Windows, you 
use the the Rect() or ClientAbs() in my package to get the position of the 
window (or the client area).

https://godoc.org/github.com/as/ms/win


On Saturday, January 14, 2017 at 8:47:17 AM UTC-8, kty...@gmail.com wrote:
>
> 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 Y are the mouse location, in pixels.". It doesn't mention if 
> they are relative to the screen or the window.
>
> How do I get the position relative to the window?
> Or is it an error of the driver (I'm using windows)?
> Neither shiny.Screen nor shiny.Window have methods to get the current 
> position of the window.
>
> Example:
> https://github.com/ktye/maps/blob/master/cmd/map/main.go#L101
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to