diff --git a/Cargo.toml b/Cargo.toml index a08492af68..8cfd23c14c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -166,7 +166,7 @@ wayland-client = { version = "0.31.1", optional = true } wayland-protocols = { version = "0.31.0", features = [ "staging"], optional = true } wayland-protocols-plasma = { version = "0.2.0", features = [ "client" ], optional = true } x11-dl = { version = "2.18.5", optional = true } -x11rb = { version = "0.12.0", default-features = false, features = ["allow-unsafe-code", "dl-libxcb", "randr", "resource_manager", "xinput", "xkb"], optional = true } +x11rb = { version = "0.13.0", default-features = false, features = ["allow-unsafe-code", "dl-libxcb", "randr", "resource_manager", "xinput", "xkb"], optional = true } xkbcommon-dl = "0.4.0" [target.'cfg(target_os = "redox")'.dependencies] diff --git a/src/platform_impl/linux/x11/window.rs b/src/platform_impl/linux/x11/window.rs index 3c4f29e079..3f0fa32606 100644 --- a/src/platform_impl/linux/x11/window.rs +++ b/src/platform_impl/linux/x11/window.rs @@ -1377,7 +1377,8 @@ impl UnownedWindow { self.xwindow as xproto::Window, xproto::AtomEnum::WM_NORMAL_HINTS, )? - .reply()?; + .reply()? + .unwrap_or_default(); callback(&mut normal_hints); normal_hints .set( @@ -1430,6 +1431,7 @@ impl UnownedWindow { ) .ok() .and_then(|cookie| cookie.reply().ok()) + .flatten() .and_then(|hints| hints.size_increment) .map(|(width, height)| (width as u32, height as u32).into()) } @@ -1824,6 +1826,7 @@ impl UnownedWindow { WmHints::get(self.xconn.xcb_connection(), self.xwindow as xproto::Window) .ok() .and_then(|cookie| cookie.reply().ok()) + .flatten() .unwrap_or_default(); wm_hints.urgent = request_type.is_some();