-
Notifications
You must be signed in to change notification settings - Fork 928
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
Remove assertions from Windows dark mode code #1459
Conversation
Fixes #1405 too. I would like to know what the error actually is, @chrisduerr mentions in #1458 that it happens in Windows 10 Enterprise LTSC 1809, which I tried and can't reproduce. So if someone can try using |
@daxpedda If you test |
12e8872
to
286e8ef
Compare
In general, winit should never assert on anything unless it means that it is impossible to continue the execution of the program. There are several assertions in the Windows dark mode code where this is not the case. Based on surface level inspection, all existing assertions could be easily replaced with just simple conditional checks, allowing the execution of the program to proceed with sane default values. Fixes rust-windowing#1458.
Co-Authored-By: daxpedda <daxpedda@gmail.com>
286e8ef
to
3844d9d
Compare
@ryanisaacg Since you were so helpful with testing the modifier PR, could you check this too? Since this is such a trivial change, it would be unfortunate if this didn't make it for the next release I think. |
There are two PRs I'm aware of that should be relatively trivial to get merged, which would fix some issues. Other than those, I don't think it makes sense to wait on anything. - Fix Windows crash: rust-windowing#1459 - Fix macOS mouse reports: rust-windowing#1490 While rust-windowing#1459 seems pretty essential to actually make winit run, rust-windowing#1490 is much less important and can probably be ignored if there aren't any resources to merge it.
I'm not on the affected version of Windows, I think? I can run it and see if it works on my system though. |
@LaylConway mentioned that she was running into these panics in the Rust Discord, and this branch fixed the issues for her. I'll go ahead and merge this now. Sorry this was sitting on the backburner for so long! |
There are two PRs I'm aware of that should be relatively trivial to get merged, which would fix some issues. Other than those, I don't think it makes sense to wait on anything. - Fix Windows crash: #1459 - Fix macOS mouse reports: #1490 While #1459 seems pretty essential to actually make winit run, #1490 is much less important and can probably be ignored if there aren't any resources to merge it.
In general, winit should never assert on anything unless it means that
it is impossible to continue the execution of the program. There are
several assertions in the Windows dark mode code where this is not the
case.
Based on surface level inspection, all existing assertions could be
easily replaced with just simple conditional checks, allowing the
execution of the program to proceed with sane default values.
Fixes #1458.
Fixes #1405.