Skip to content
New issue

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

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

Already on GitHub? # to your account

Make the eye dropper work with more than one screen #3

Merged
merged 2 commits into from
Sep 20, 2019
Merged

Make the eye dropper work with more than one screen #3

merged 2 commits into from
Sep 20, 2019

Conversation

baltpeter
Copy link
Contributor

Hi,

first of all, thank you very much for the great library! It was very helpful for a recent project of mine.

I noticed that the eye dropper was hardcoded to only use the primary
screen.

In this PR, I tried to change that behaviour to essentially use the screen
the mouse is located on instead and re-take the screenshot as well as move
the eye dropper window when the mouse moves to a different screen.

Unfortunately, this change depends on winforms code for the System.Windows.Forms.Screen API. It may be possible to instead replace that with WpfScreenHelper which seems to be a little more lightweight. Not sure what your preferences are here.

Let me know if you need any more changes to be done.

Cheers,
Benni

Previously, the eye dropper was hardcoded to only use the primary
screen.

This commit changes that behaviour to essentially use the screen
the mouse is located on and re-take the screenshot as well as move
the eye dropper window when the mouse moves to a different screen.
@dsafa
Copy link
Owner

dsafa commented Sep 19, 2019

Thanks! I think that avoiding adding Windows.Forms is a good idea. That WpfScreenHelper library looks like a nice alternative.

@baltpeter
Copy link
Contributor Author

Sure, that's easy enough. Implemented in c44c6c0.

@dsafa
Copy link
Owner

dsafa commented Sep 19, 2019

Thanks again! I'm gonna close and reopen the pr to see if I can get the CI to work properly this time

@dsafa dsafa closed this Sep 19, 2019
@dsafa dsafa reopened this Sep 19, 2019
@dsafa dsafa merged commit e8f95b3 into dsafa:master Sep 20, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants