Skip to content

Commit

Permalink
gdk-wayland: Drop the xkb feature
Browse files Browse the repository at this point in the history
It fails to build because of meh/rust-xkb#8
We might remove that feature or replace it somehow

The commit could also be reverted once upstream gets a new fixed
release

but for now, this breaks the docs (using --all-features) & CI
  • Loading branch information
bilelmoussaoui committed Jan 20, 2024
1 parent 2558f70 commit 87bec4d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- { name: "gdk4", features: "v4_14,gl", test_sys: true }
- {
name: "gdk4-wayland",
features: "v4_12,wayland_crate,egl,xkb_crate",
features: "v4_12,wayland_crate,egl",
test_sys: true,
}
- { name: "gdk4-x11", features: "v4_4,xlib,egl", test_sys: false }
Expand Down
2 changes: 0 additions & 2 deletions gdk4-wayland/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ v4_10 = ["ffi/v4_10", "v4_4", "gdk/v4_10"]
v4_12 = ["ffi/v4_12", "v4_10", "gdk/v4_12"]
wayland_crate = ["wayland-client", "wayland-backend"]
egl = ["khronos-egl"]
xkb_crate = ["xkb"]

[package.metadata.docs.rs]
all-features = true
Expand All @@ -34,7 +33,6 @@ libc = "0.2"
wayland-client = {version = "0.31.0", optional = true}
wayland-backend = {version = "0.3.0", optional = true, features = ["client_system"]}
khronos-egl = {version = "6.0", optional = true}
xkb = {version = "0.3", optional = true}

[dev-dependencies]
gir-format-check = "^0.1"
2 changes: 1 addition & 1 deletion gdk4-wayland/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ status = "generate"
manual = true
[[object.function]]
name = "get_xkb_keymap"
manual = true
ignore = true

[[object]]
name = "GdkWayland.WaylandDisplay"
Expand Down
1 change: 0 additions & 1 deletion gdk4-wayland/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-w
| `v4_4` | Enable the new APIs part of GTK 4.4 |
| `wayland_crate` | Integration with the [wayland-client](https://crates.io/crates/wayland-client) crate |
| `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate |
| `xkb_crate` | Integration with [xkb](https://crates.io/crates/xkb) crate |

### See Also

Expand Down
3 changes: 0 additions & 3 deletions gdk4-wayland/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ pub use khronos_egl;
#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
pub use wayland_client;
#[cfg(all(feature = "v4_4", feature = "xkb_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
pub use xkb;

mod auto;

Expand Down
23 changes: 3 additions & 20 deletions gdk4-wayland/src/wayland_device.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(any(feature = "wayland_crate", feature = "xkb_crate"))]
#[cfg(feature = "wayland_crate")]
#[cfg_attr(
docsrs,
doc(cfg(any(feature = "wayland_crate", feature = "xkb_crate")))
doc(cfg(feature = "wayland_crate"))
)]
use glib::translate::*;
#[cfg(feature = "wayland_crate")]
Expand All @@ -13,9 +13,7 @@ use wayland_client::{
protocol::{wl_keyboard::WlKeyboard, wl_pointer::WlPointer, wl_seat::WlSeat},
Proxy,
};
#[cfg(all(feature = "v4_4", feature = "xkb_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
use xkb::Keymap;


#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
Expand Down Expand Up @@ -80,19 +78,4 @@ impl WaylandDevice {
}
}
}

#[cfg(all(feature = "v4_4", feature = "xkb_crate"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
#[doc(alias = "gdk_wayland_device_get_xkb_keymap")]
#[doc(alias = "get_xkb_keymap")]
pub fn xkb_keymap(&self) -> Option<Keymap> {
unsafe {
let ptr = ffi::gdk_wayland_device_get_xkb_keymap(self.to_glib_none().0);
if ptr.is_null() {
None
} else {
Some(Keymap::from_ptr(ptr as _))
}
}
}
}

0 comments on commit 87bec4d

Please sign in to comment.