wl-client 0.2.0

Safe client-side libwayland wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use {
    crate::Libwayland,
    std::{thread, time::Duration},
};

#[test]
fn try_flush_error() {
    let lib = Libwayland::open().unwrap();
    let con = lib.connect_to_default_display().unwrap();
    unsafe {
        lib.inject_error(con.wl_display().as_ptr());
    }
    if con.flush().is_ok() {
        thread::sleep(Duration::from_millis(500));
        assert!(con.flush().is_err());
    }
}