python-mss icon indicating copy to clipboard operation
python-mss copied to clipboard

Windows: capture cursor

Open toxicrecker opened this issue 1 year ago • 5 comments

Changes proposed in this PR

  • Capture cursor implemented for windows

It is very important to keep up to date tests and documentation.

  • [x] Tests added/updated
  • [x] Documentation updated

Is your code right?

  • [x] PEP8 compliant
  • [x] flake8 passed

toxicrecker avatar Jan 25 '24 10:01 toxicrecker

Great PR, thank you !

Would you mind adding tests like I did in https://github.com/BoboTiG/python-mss/blob/e66199adcdad737ef4d66183083bd26c827090da/src/tests/test_gnu_linux.py 🙏🏻 ?

I have absolutely no experience in writing tests, sorry Best I could do is copy paste what you did with linux tests and remove the hasattr(sct, "xfixes") assertation, I will do that if you want

toxicrecker avatar Jan 25 '24 12:01 toxicrecker

I was trying to make sense of how your linux tests worked, and I assume that you try taking screenshots of a black screen one with cursor and one without cursor and then check if you find an RGB value other than 0, am I right? And if I'm right how do you run this test? I can't make sense of how you are actually going to run this test in a way it does it's job because the screen is mostly never pitch black, do you have a second completely blank monitor that you use for this test? Sorry if I'm just being dumb I don't have any experience with testing.

toxicrecker avatar Jan 25 '24 12:01 toxicrecker

Windows tests will be more tricky, for sure. I will be able to help on that side 👍🏻

BoboTiG avatar Jan 25 '24 12:01 BoboTiG

Windows tests will be more tricky, for sure. I will be able to help on that side 👍🏻

Thank you, is there anything else I could help with?

toxicrecker avatar Jan 25 '24 13:01 toxicrecker

Thank you, is there anything else I could help with?

It's all good for now. I'll check the code, test it on a VM, and get back to the PR when I'll have some time.

BoboTiG avatar Jan 25 '24 13:01 BoboTiG