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

Add determinant check for minimized windows #79766

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

Sauermann
Copy link
Contributor

When the Window is minimized, the transform-determinant can be 0. Add a check to prevent this case.

resolve #79759

When the Window is minimized, the transform-determinant can be 0.
Add a check to prevent this case.
@Sauermann Sauermann added this to the 4.2 milestone Jul 21, 2023
@Sauermann Sauermann requested a review from a team as a code owner July 21, 2023 22:05
@ghost
Copy link

ghost commented Jul 25, 2023

Thank you for fixing!

Copy link
Member

@RandomShaper RandomShaper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Philosophical note:
To me, checking the determinant is delving down into the lower layer of detail, being too ad hoc. I think it would be better to let the code "reason" more at its level of concern, along the lines of "if the window is minimized, I won't ask for a transform since it makes no sense" (vs. this PR, which would be like, "since I know that asking for a transform may yield an ill matrix in some cases, I ask anyway but check the sanity of the matrix").

PS: The boundary between both approaches is too thin, now I think of it. Just apply your best judgement.

@YuriSizov YuriSizov merged commit 712f49e into godotengine:master Jul 26, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@Sauermann Sauermann deleted the fix-window-determinant-zero branch July 26, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants