Skip to content

Conversation

@g-k-s-03
Copy link

Summary

This PR fixes a ZeroDivisionError that occurs when a hidden window is shown on Windows. The fix calls _update_density_and_dpi() after Window.show().

Issue

#9170

How to test

from kivy.core.window import Window
Window.hide()
Window.show()  # Should not raise ZeroDivisionError
assert Window._density > 0

@welcome
Copy link

welcome bot commented Oct 15, 2025

Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines.

@g-k-s-03
Copy link
Author

@kuzeyron Hi, just checking if you need anything from me to move this forward. Thanks!

@misl6
Copy link
Member

misl6 commented Oct 24, 2025

Closing as duplicate of #9189

@misl6 misl6 closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants