Let Window::inner_size()
return None
if the Window isn't "ready" yet
#2863
Labels
Window::inner_size()
return None
if the Window isn't "ready" yet
#2863
I've heard this come up many times before, but when using Winit to render stuff, users often have to check for the window size not to be zero.
I've encountered this before in X11, but I don't know the story behind this on other backends. For Wasm, it's easy to hit this problem at application startup, where the canvas isn't even inserted yet into the DOM, where it makes perfect sense to return
None
inWindow::inner_size()
. See #2859 (comment) which spawned this issue.The text was updated successfully, but these errors were encountered: