Winit: No window when running example on Wayland, Sway

Created on 26 Jan 2019  路  5Comments  路  Source: rust-windowing/winit

Maybe duplicate of https://github.com/tomaka/winit/issues/640 .

I was investigating https://github.com/jwilm/alacritty/issues/2041 and tried to run an example:

cargo run --example window
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/examples/window`
WindowEvent { window_id: WindowId(Wayland(WindowId(94592017375568))), event: Refresh }

At this point I do not see a window, there is no further output and the command is still running.

sway --version
sway version 1.0-beta.2-274-g5f45a4bb (Jan 25 2019, branch 'makepkg')
Wayland help wanted enhancement

Most helpful comment

As said in the other issue, given how wayland works a window does not exist until its contents have been drawn once.

However the winit examples do not draw anything, hence the windows never appear.

You may prefer to use the glutin examples to work with, as they draw something.

All 5 comments

As said in the other issue, given how wayland works a window does not exist until its contents have been drawn once.

However the winit examples do not draw anything, hence the windows never appear.

You may prefer to use the glutin examples to work with, as they draw something.

Thank you for the clarification. I did not realize the answer in the other thread also applies to the examples. It seems like the examples are intended to show a window so I still feel this is a bug but since you say this is expected Wayland behavior feel free to close this issue.

I agree it is probably worth it to add some wayland-specific code that blanks the window in the examples, so that they can actually work.

Le 26 janvier 2019 23:23:11 GMT+01:00, Valentin notifications@github.com a 茅crit :

Thank you for the clarification. I did not realize the answer in the
other thread also applies to the examples. It seems like the examples
are intended to show a window so I still feel this is a bug but since
you say this is expected Wayland behavior feel free to close this
issue.

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/tomaka/winit/issues/776#issuecomment-457870983

@vberger Has this been resolved with the changes in eventsloop v2?

@ZeGentzy yes, this bug is fixed in eventloop-2.0 branch, but reproducible in master. It is reintroduced by b8192ef6f6e79d9dfd28b6992e23c1ced73fb64b.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisduerr picture chrisduerr  路  4Comments

alexheretic picture alexheretic  路  4Comments

coderhwz picture coderhwz  路  3Comments

ryanisaacg picture ryanisaacg  路  3Comments

felixrabe picture felixrabe  路  3Comments