BoboTiG / python-mss

An ultra fast cross-platform multiple screenshots module in pure Python using ctypes.
https://pypi.org/project/mss/
MIT License
987 stars 88 forks source link

Windows: capture cursor #272

Open toxicrecker opened 6 months ago

toxicrecker commented 6 months ago

Changes proposed in this PR

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

Is your code right?

toxicrecker commented 6 months ago

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 commented 6 months ago

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.

BoboTiG commented 6 months ago

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

toxicrecker commented 6 months ago

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?

BoboTiG commented 6 months ago

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.