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

getCursorScreenPoint bug #22659

Closed
pureZjr opened this issue Mar 12, 2020 · 2 comments
Closed

getCursorScreenPoint bug #22659

pureZjr opened this issue Mar 12, 2020 · 2 comments

Comments

@pureZjr
Copy link

pureZjr commented Mar 12, 2020

My mac monitor size is 1440 x 900
My External monitor size is 2560 x 1440

when i have no External monitor,i use screen.getCursorScreenPoint() get my mouse point is
{ x: 30 , y: 47 }

when i have External monitor,i get my mouse point is {x: 1470 , y: -330 }

i think that the point X can use 1470 - 1440 = 30, but the point Y i have no idea how to calculate。

@MarshallOfSound
Copy link
Member

@pureZjr The x and y coords are based on a coordinates system who's origin depends on the layout and configuration of your monitors. You shouldn't be trying to translate these coordinates like this, they are already in the correct coordinates system.

@MarshallOfSound
Copy link
Member

GitHub issues are for feature requests and bug reports, questions about using Electron or code assistance requests should be directed to the community or to the Slack Channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants