egui_winit: support winit with default features disabled (#1971)
* egui_winit: support winit with default features disabled * Link to the PR in the changelog
This commit is contained in:
parent
153524023f
commit
be9f363c53
4 changed files with 11 additions and 4 deletions
|
@ -3,7 +3,8 @@ All notable changes to the `egui-winit` integration will be noted in this file.
|
|||
|
||||
|
||||
## Unreleased
|
||||
|
||||
* The default features of the `winit` crate are not enabled if the default features of `egui-winit` are disabled too ([#1971](https://github.com/emilk/egui/pull/1971))
|
||||
* Added new feature `wayland` which enables Wayland support ([#1971](https://github.com/emilk/egui/pull/1971))
|
||||
|
||||
## 0.19.0 - 2022-08-20
|
||||
* MSRV (Minimum Supported Rust Version) is now `1.61.0` ([#1846](https://github.com/emilk/egui/pull/1846)).
|
||||
|
|
|
@ -18,7 +18,7 @@ all-features = true
|
|||
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "links"]
|
||||
default = ["clipboard", "links", "wayland", "winit/default"]
|
||||
|
||||
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`egui::epaint::Vertex`], [`egui::Vec2`] etc to `&[u8]`.
|
||||
bytemuck = ["egui/bytemuck"]
|
||||
|
@ -39,6 +39,8 @@ screen_reader = ["tts"]
|
|||
## Allow serialization of [`WindowSettings`] using [`serde`](https://docs.rs/serde).
|
||||
serde = ["egui/serde", "dep:serde"]
|
||||
|
||||
## Enables Wayland support.
|
||||
wayland = ["winit/wayland"]
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.19.0", path = "../egui", default-features = false, features = [
|
||||
|
@ -46,7 +48,7 @@ egui = { version = "0.19.0", path = "../egui", default-features = false, feature
|
|||
] }
|
||||
instant = { version = "0.1", features = ["wasm-bindgen"] } # We use instant so we can (maybe) compile for web
|
||||
tracing = { version = "0.1", default-features = false, features = ["std"] }
|
||||
winit = "0.27.2"
|
||||
winit = { version = "0.27.2", default-features = false }
|
||||
|
||||
#! ### Optional dependencies
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ mod window_settings;
|
|||
pub use window_settings::WindowSettings;
|
||||
|
||||
use winit::event_loop::EventLoopWindowTarget;
|
||||
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
|
@ -777,6 +779,7 @@ fn translate_cursor(cursor_icon: egui::CursorIcon) -> Option<winit::window::Curs
|
|||
|
||||
/// Returns a Wayland display handle if the target is running Wayland
|
||||
fn wayland_display<T>(_event_loop: &EventLoopWindowTarget<T>) -> Option<*mut c_void> {
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
|
|
|
@ -37,7 +37,8 @@ cargo doc --document-private-items --no-deps --all-features
|
|||
(cd crates/egui_extras && cargo check --no-default-features)
|
||||
(cd crates/egui_glium && cargo check --no-default-features)
|
||||
(cd crates/egui_glow && cargo check --no-default-features)
|
||||
(cd crates/egui-winit && cargo check --no-default-features)
|
||||
(cd crates/egui-winit && cargo check --no-default-features --features "wayland")
|
||||
(cd crates/egui-winit && cargo check --no-default-features --features "winit/x11")
|
||||
(cd crates/emath && cargo check --no-default-features)
|
||||
(cd crates/epaint && cargo check --no-default-features --release)
|
||||
(cd crates/epaint && cargo check --no-default-features)
|
||||
|
|
Loading…
Reference in a new issue