Skip to content

kvui: fix ZeroDivisionError on windows after monitor reset by setting fixed DPI - #6341

Open
Berserker66 wants to merge 2 commits into
mainfrom
kvui_fixed_dpi
Open

kvui: fix ZeroDivisionError on windows after monitor reset by setting fixed DPI#6341
Berserker66 wants to merge 2 commits into
mainfrom
kvui_fixed_dpi

Conversation

@Berserker66

Copy link
Copy Markdown
Member

What is this fixing or adding?

On Windows after a monitor is "lost", such as by the system going to sleep, if any kivy clients were on that monitor then the clients would spam a ZeroDivisionError on any mouse move event going through them. We already have disabled DPI aware scaling, so we can just kill off even more of that system and "fix" the exception spam.

How was this tested?

On my 3-monitor windows 11 system.

If this makes graphical changes, please attach screenshots.

image Leftmost client is with this change, the others are 0.6.7 stable release, all on the same monitor after the monitor was turned off and then on again.

@github-actions github-actions Bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jul 19, 2026
@duckboycool

Copy link
Copy Markdown
Collaborator

Is this something that should be removed once kivy does a new release, or would it make sense to keep this even after it's dealt with upstream? If it's the former, it'd probably be worth having a comment saying that.

@Berserker66

Berserker66 commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

We have kivy's DPI scaling disabled anyway, so it would be safe to keep around, all it should do is skip some calculations that we don't need anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants