-
Notifications
You must be signed in to change notification settings - Fork 913
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
window.current_monitor() panics on Wayland when the window is hidden #1257
Comments
I just tested this for myself on a VM. I get the same panic running the invaders example in |
A wayland window does not appear on the screen until it has been drawn at least once. Before that is done, the window has no existence, and as such is not displayed, does not receive any event, and is not considered to be on any monitor. |
I only see a window with
|
Even with the winit examples, though? What? |
The winit examples do not draw anything, that's a long running issue we've had, but we didn't yet find a satisfactory way to handle it. In your case, the window never appearing is possibly due to the fact that you start the event loop before having drawn anything, so winit blocks waiting for events that never come as the window do not exist on screen yet. At least these symptoms match. |
@vberger is there something "reasonable" to draw before entering the event loop? An empty window frame, perhaps? In my case I could draw the unscaled image and then attempt to resize and re-position the window. That would probably look very bad, though. |
Duplicate of #793 |
Similar to #793 but panics in a completely different code path:
winit/src/platform_impl/linux/wayland/window.rs
Line 334 in 72fc6a7
Backtrace
Originally reported on parasyte/pixels#29
The text was updated successfully, but these errors were encountered: