Hi, I am trying to get the current WM name using the code below:
let xcb_con = xcb::Connection::connect(Option::None).unwrap().0;
let ewmh_con = ewmh::Connection::connect(&xcb_con);
let request = ewmh::proto::GetWmName;
let cookie = ewmh_con.send_request(&request);
let reply = ewmh_con.wait_for_reply(cookie).unwrap();
println!("{:?}", reply);
but rustc says this:
error[E0277]: the trait bound `fn(xcb::x::Window) -> GetWmName {GetWmName}: ewmh::traits::EwmhPropertyRequestUnchecked` is not satisfied
--> src/wm.rs:8:50
|
8 | let cookie = ewmh_con.send_request_unchecked(&request);
| ---------------------- ^^^^^^^^ the trait `ewmh::traits::EwmhPropertyRequestUnchecked` is not implemented for fn item `fn(xcb::x::Window) -> GetWmName {GetWmName}`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `ewmh::traits::EwmhPropertyRequestUnchecked`:
DesktopLayout
GetActiveWindow
GetClientList
GetClientListStacking
GetCurrentDesktop
GetDesktopGeometry
GetDesktopNames
GetDesktopViewport
and 13 others
note: required by a bound in `xcb_wm::ewmh::Connection::<'a>::send_request_unchecked`
--> /home/p4rsec/.cargo/registry/src/github.com-1ecc6299db9ec823/xcb-wm-0.4.0/src/ewmh/connection.rs:52:12
|
52 | R: EwmhPropertyRequestUnchecked,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `xcb_wm::ewmh::Connection::<'a>::send_request_unchecked`
Hi, I am trying to get the current WM name using the code below:
but rustc says this:
Any help would be really appreciated.