Why does GetImage fail here?
#952
-
use x11rb::{connection::Connection, image::Image};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let (conn, screen_pref) = x11rb::connect(None)?;
let setup = conn.setup();
let screen = &setup.roots[screen_pref];
let (_img, _) = Image::get(
&conn,
screen.root,
0,
0,
screen.width_in_pixels,
screen.height_in_pixels,
)?;
Ok(())
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
TL;DR: I do not know why this fails for you. Uhm... Works For Me (tm). I just ran this in Running under https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:GetImage says:
I do not understand why part of the root window would not be visible on screen... Does the |
Beta Was this translation helpful? Give feedback.
-
|
I am getting the same error on KDE Wayland, where the |
Beta Was this translation helpful? Give feedback.
I am getting the same error on KDE Wayland, where the
bad_valueis the ID of the root window. I believe that it is because the root window is not a real window on Xwayland.