From 4b018f564ab7469cba929a525950207721cd45ce Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 8 May 2022 13:59:24 -0700 Subject: [PATCH] window: point to my xcb for for IME changes refs: https://github.com/rust-x-bindings/rust-xcb/pull/190 refs: https://github.com/H-M-H/xcb-imdkit-rs/pull/2 --- Cargo.lock | 5 ++--- Cargo.toml | 3 +++ window/Cargo.toml | 2 +- window/src/os/x11/connection.rs | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e9c149ff..3d637958f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5160,8 +5160,7 @@ dependencies = [ [[package]] name = "xcb" version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b127bf5bfe9dbb39118d6567e3773d4bbc795411a8e1ef7b7e056bccac0011a9" +source = "git+https://github.com/wez/rust-xcb?branch=ffi#a4d3014de25becb8d68029fe2f71ad906349549e" dependencies = [ "bitflags", "libc", @@ -5172,7 +5171,7 @@ dependencies = [ [[package]] name = "xcb-imdkit" version = "0.2.0" -source = "git+https://github.com/wez/xcb-imdkit-rs.git?rev=605f9ed36f2c9a514120d1b1b963b48ea3062280#605f9ed36f2c9a514120d1b1b963b48ea3062280" +source = "git+https://github.com/wez/xcb-imdkit-rs.git?rev=ede7c71b85fe2537efef6cf999a45690316211cf#ede7c71b85fe2537efef6cf999a45690316211cf" dependencies = [ "bitflags", "cc", diff --git a/Cargo.toml b/Cargo.toml index d98c5b2b7..8dccf1f17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,6 @@ opt-level = 3 [profile.dev] # https://jakedeichert.com/blog/reducing-rust-incremental-compilation-times-on-macos-by-70-percent/ split-debuginfo = "unpacked" + +[patch.crates-io] +xcb = {version="1.1", git="https://github.com/wez/rust-xcb", branch="ffi"} diff --git a/window/Cargo.toml b/window/Cargo.toml index 5f8ecd2c9..50b78454e 100644 --- a/window/Cargo.toml +++ b/window/Cargo.toml @@ -76,7 +76,7 @@ smithay-client-toolkit = {version = "0.15", default-features=false, optional=tru wayland-protocols = {version="0.29", optional=true} wayland-client = {version="0.29", optional=true} wayland-egl = {version="0.29", optional=true} -xcb-imdkit = { version="0.2", git="https://github.com/wez/xcb-imdkit-rs.git", rev="605f9ed36f2c9a514120d1b1b963b48ea3062280"} +xcb-imdkit = { version="0.2", git="https://github.com/wez/xcb-imdkit-rs.git", rev="ede7c71b85fe2537efef6cf999a45690316211cf"} [target.'cfg(target_os="macos")'.dependencies] cocoa = "0.20" diff --git a/window/src/os/x11/connection.rs b/window/src/os/x11/connection.rs index dc7179972..454709e80 100644 --- a/window/src/os/x11/connection.rs +++ b/window/src/os/x11/connection.rs @@ -512,8 +512,7 @@ impl XConnection { .ime .borrow_mut() .set_forward_event_cb(move |_win, e| { - if let err @ Err(_) = conn.process_xcb_event(e) - { + if let err @ Err(_) = conn.process_xcb_event(e) { if let Err(err) = conn.ime_process_event_result.replace(err) { log::warn!("IME process event error dropped: {}", err); }