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

@ -11,12 +11,6 @@ fn main() {
let cursors = [MouseCursor::Default, MouseCursor::Crosshair, MouseCursor::Hand, MouseCursor::Arrow, MouseCursor::Move, MouseCursor::Text, MouseCursor::Wait, MouseCursor::Help, MouseCursor::Progress, MouseCursor::NotAllowed, MouseCursor::ContextMenu, MouseCursor::NoneCursor, MouseCursor::Cell, MouseCursor::VerticalText, MouseCursor::Alias, MouseCursor::Copy, MouseCursor::NoDrop, MouseCursor::Grab, MouseCursor::Grabbing, MouseCursor::AllScroll, MouseCursor::ZoomIn, MouseCursor::ZoomOut, MouseCursor::EResize, MouseCursor::NResize, MouseCursor::NeResize, MouseCursor::NwResize, MouseCursor::SResize, MouseCursor::SeResize, MouseCursor::SwResize, MouseCursor::WResize, MouseCursor::EwResize, MouseCursor::NsResize, MouseCursor::NeswResize, MouseCursor::NwseResize, MouseCursor::ColResize, MouseCursor::RowResize];
let mut cursor_idx = 0;
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
match event {
Event::WindowEvent { event: WindowEvent::KeyboardInput { input: KeyboardInput { state: ElementState::Pressed, .. }, .. }, .. } => {

View file

@ -31,12 +31,6 @@ fn main() {
.build(&events_loop)
.unwrap();
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
println!("{:?}", event);

View file

@ -10,12 +10,6 @@ fn main() {
let mut grabbed = false;
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
println!("{:?}", event);

View file

@ -9,12 +9,6 @@ fn main() {
.build(&events_loop)
.unwrap();
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
println!("{:?}", event);

View file

@ -9,12 +9,6 @@ fn main() {
let mut num_windows = 3;
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
match event {
winit::Event::WindowEvent { event: winit::WindowEvent::Closed, window_id } => {

View file

@ -10,12 +10,6 @@ fn main() {
let proxy = events_loop.create_proxy();
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
std::thread::spawn(move || {
// Wake up the `events_loop` once every second.
loop {

View file

@ -9,12 +9,6 @@ fn main() {
window.set_title("A fantastic window!");
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
println!("{:?}", event);

View file

@ -8,12 +8,6 @@ fn main() {
.build(&events_loop)
.unwrap();
if cfg!(target_os = "linux") {
println!("Running this example under wayland may not display a window at all.\n\
This is normal and because this example does not actually draw anything in the window,\
thus the compositor does not display it.");
}
events_loop.run_forever(|event| {
println!("{:?}", event);