wayland: upgrade wayland-window (#339)

* wayland: upgrade wayland-window

This new version of wayland window considerably simplifies the
window handling for winit, meaning much of the previous juggling
is no longer needed, and the windows will appear even if nothing is
drawn.

* wayland: cleanup unused stuff
This commit is contained in:
Victor Berger 2017-11-03 17:35:29 +01:00 committed by GitHub
parent 37a10e6741
commit 61d25be3e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 67 additions and 158 deletions

View file

@ -121,13 +121,11 @@ pub trait WindowExt {
/// Check if the window is ready for drawing
///
/// On wayland, drawing on a surface before the server has configured
/// it using a special event is illegal. As a result, you should wait
/// until this method returns `true`.
/// It is a remnant of a previous implementation detail for the
/// wayland backend, and is no longer relevant.
///
/// Once it starts returning `true`, it can never return `false` again.
///
/// If the window is X11-based, this will just always return `true`.
/// Always return true.
#[deprecated]
fn is_ready(&self) -> bool;
}
@ -195,10 +193,7 @@ impl WindowExt for Window {
#[inline]
fn is_ready(&self) -> bool {
match self.window {
LinuxWindow::Wayland(ref w) => w.is_ready(),
LinuxWindow::X(_) => true
}
true
}
}