diff --git a/examples/cursor.rs b/examples/cursor.rs index bc7deea6..2062d8a7 100644 --- a/examples/cursor.rs +++ b/examples/cursor.rs @@ -11,6 +11,12 @@ 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, .. }, .. }, .. } => { diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 6f2f118a..daeb68b6 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -31,6 +31,12 @@ 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); diff --git a/examples/grabbing.rs b/examples/grabbing.rs index f7e7c9b3..68ef7701 100644 --- a/examples/grabbing.rs +++ b/examples/grabbing.rs @@ -10,6 +10,12 @@ 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); diff --git a/examples/min_max_size.rs b/examples/min_max_size.rs index 7500e893..b5020e73 100644 --- a/examples/min_max_size.rs +++ b/examples/min_max_size.rs @@ -9,6 +9,12 @@ 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); diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index 9c5b93b8..c020f69d 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -9,6 +9,12 @@ 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 } => { diff --git a/examples/proxy.rs b/examples/proxy.rs index 338c4675..fa9ca014 100644 --- a/examples/proxy.rs +++ b/examples/proxy.rs @@ -10,6 +10,12 @@ 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 { diff --git a/examples/transparent.rs b/examples/transparent.rs index de633175..29dd9415 100644 --- a/examples/transparent.rs +++ b/examples/transparent.rs @@ -9,6 +9,12 @@ 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); diff --git a/examples/window.rs b/examples/window.rs index 65f0ade2..6dc909a8 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -8,6 +8,12 @@ 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);