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 frame return wrong value #90

Open
huanghui1998hhh opened this issue Mar 16, 2022 · 1 comment
Open

Window frame return wrong value #90

huanghui1998hhh opened this issue Mar 16, 2022 · 1 comment

Comments

@huanghui1998hhh
Copy link

huanghui1998hhh commented Mar 16, 2022

image
When my screens display like this, window frame will return wrong value.

Example:
image
My screens frame are (0.0, 0.0, 1920.0, 1080.0) and (-337.0, 1080.0, 2560.0, 1440.0),
this window frame should return (0, 0, 920, 436), but it return (0.0, 1440.0, 920.0, 436.0) actually.
1440 seems like my top screen's height, i don't know if it matter.

Update:
Through experiment, i found some rule, when MainScreen size smaller than SubScreen, window's frame will be return x higher than real value (x = SubScreen.height + SubScreen.minY - MainScreen.height). Hope this can help you.

@huanghui1998hhh
Copy link
Author

image When my screens display like this, window frame will return wrong value.

Example: image My screens frame are (0.0, 0.0, 1920.0, 1080.0) and (-337.0, 1080.0, 2560.0, 1440.0), this window frame should return (0, 0, 920, 436), but it return (0.0, 1440.0, 920.0, 436.0) actually. 1440 seems like my top screen's height, i don't know if it matter.

Update: Through experiment, i found some rule, when MainScreen size smaller than SubScreen, window's frame will be return x higher than real value (x = SubScreen.height + SubScreen.minY - MainScreen.height). Hope this can help you.

I have found out the reason, in the step of converting coordinate, a wrong method was used.
This wrong methed equivalent to the origin before conversion always in the upper left corner of all screens, but in fact, it use the main screen's upper left corner as the origin.
So I've solved this wrong.

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