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

Window's bounding box includes "invisible borders" #25

Open
grudzik opened this issue Apr 19, 2020 · 0 comments
Open

Window's bounding box includes "invisible borders" #25

grudzik opened this issue Apr 19, 2020 · 0 comments

Comments

@grudzik
Copy link

grudzik commented Apr 19, 2020

Hello,
I was using pyautogui module that is using this, and I found some strange issue. It is not a case of the library here (Windows related), but I'd say that maybe it could be adapted?

My OS is Windows 10, 64 bit, Python 3.7.1.

Generally, when Window is placed (seemingly) at 0,0, and the Windows is found and then when getting the 'box' (_getWindowRect or whatever) 'it will show something such as:
-7, 0, right, bottom
where, the -7 is surprising and caused me some mistakes on "exact" pixel analysis.

I did try this using the library, but also by executing the code in C# - the result is the same. However, this issue was not only observed by me, but also here:
https://stackoverflow.com/questions/34139450/getwindowrect-returns-a-size-including-invisible-borders

I'd not know about all the use-cases, but maybe it would be worth to add an option to get the "box" with taking these values in consideration? As not to mess up with the other libs, maybe set this value as not default, but just as a possibility.

In this answer, the code's already there - I could even adapt the change, but still, the question is whether it would not "cause problems" and has it ever been discussed?
The aforementioned answer: https://stackoverflow.com/a/34143777

Regards,
MG.

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

1 participant