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

Does not support multiple monitors #26

Closed
bpatram opened this issue Apr 11, 2018 · 15 comments
Closed

Does not support multiple monitors #26

bpatram opened this issue Apr 11, 2018 · 15 comments
Assignees
Labels

Comments

@bpatram
Copy link

bpatram commented Apr 11, 2018

When using the color picker eyedropper, if you move your cursor to a monitor different than the primary monitor the color picker always shows white (#FFFFFF) and not the actual color under the cursor.

I am using version 2.0.0

@Toinane
Copy link
Owner

Toinane commented Apr 11, 2018

Hey! It really strange, It work on my multiple monitors.. What is your OS? You don't have any errors?

@wabisabit
Copy link

Same here on macOS. I get white when y position is negative. It's probably related to this issue:
octalmage/robotjs#88
which might be getting fixed here:
octalmage/robotjs#307

@Toinane
Copy link
Owner

Toinane commented Apr 12, 2018

Oh okey, I suppose it's because I don't have negative position with my second screen on macOS, I will test that when I can I follow the fix for robotjs! Thanks @RomanRandom!

@wabisabit
Copy link

You're welcome @Toinane
I'm looking into porting my color palette Chrome app to Electron and adding a color picker to it is my nº 1 priority

@bpatram
Copy link
Author

bpatram commented Apr 15, 2018

@Toinane I am running macOS 10.12.6 (Sierra). I think what @RomanRandom is saying regarding my displays being in a negative position may be a plausible explanation.

However, I am unsure how I could verify this. If you could point me to the file or line of code that I could throw a breakpoint on via the developer tools and poke around to reveal the cursor position to verify that I would be more than happy to!

@bpatram
Copy link
Author

bpatram commented Apr 15, 2018

In my particular configuration I have two monitors side by side, with my primary monitor being the right monitor and my secondary monitor on the left. However, when getting cursor position (using xdotool) it seems the origin is set to my left most monitor top left corner (not the primary monitor which I was expecting), so global cursor coordinates are never negative.

I have tested it using xdotool getmouselocation (brew install xdotool). I am unsure if the position reported viaxdotool uses the same coordinate system as robot.js or osx-mouse (which is being used in this situation?)

@wabisabit
Copy link

You can check the position here @bpatram. My secondary monitor is on top of the main one.

@Toinane
Copy link
Owner

Toinane commented Apr 15, 2018

Okey thanks for your precisions! I will test it on my mac tomorrow and try to resolve this problem asap!
It's a cool plugin @RomanRandom :D

@bpatram
Copy link
Author

bpatram commented Apr 15, 2018

Thank you @RomanRandom! @Toinane I was able to pull down master and throw a breakpoint in and I can confirm the x position is reporting a negative value when my cursor is on my second display. It seems the position origin is reported as being the top left corner of the primary monitor (which is different than what xdotool reports, which is interesting).

@Toinane Toinane added this to the 2.0.1 milestone Apr 16, 2018
@Toinane
Copy link
Owner

Toinane commented Apr 16, 2018

Okey I was able to reproduce the bug on my mac, I don't see the bug on Windows.

@Toinane
Copy link
Owner

Toinane commented Apr 16, 2018

Fix for robotjs here: Toinane/robotjs@e3ac54a
I will make a build for macos today

@Toinane
Copy link
Owner

Toinane commented Apr 16, 2018

Okey it's now good! You can download the fixe here: https://github.com/Toinane/colorpicker/releases/tag/2.0.1 :)

I will add an auto-updater in future, It will be much easier.

Thank you @bpatram & @RomanRandom for your help!

@bpatram
Copy link
Author

bpatram commented Apr 16, 2018

Confirming that the latest version (2.0.1) resolves the issue! Thank you everyone! :)

@wabisabit
Copy link

Yes, working nicely! Thank you!

@Louis-7
Copy link

Louis-7 commented Jul 10, 2019

Thank you! It's working on my environment.

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

No branches or pull requests

4 participants