From 722dc6789820098fa66eadcec3044fd962bb1bd6 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 16 Dec 2024 19:40:24 +0100 Subject: [PATCH 1/2] Revert "Revert "forward x11 and wayland features to glutin" (#5391) (#5488)" This reverts commit adfc0bebfc6be14cee2068dee758412a5e0648dc. --- Cargo.toml | 4 ++-- crates/eframe/Cargo.toml | 10 ++++------ crates/egui_glow/Cargo.toml | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4077f9d7ed2..10172b66252 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,8 +78,8 @@ criterion = { version = "0.5.1", default-features = false } dify = { version = "0.7", default-features = false } document-features = "0.2.10" glow = "0.16" -glutin = "0.32.0" -glutin-winit = "0.5.0" +glutin = { version = "0.32.0", default-features = false } +glutin-winit = { version = "0.5.0", default-features = false } home = "0.5.9" image = { version = "0.25", default-features = false } kittest = { version = "0.1" } diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 16ba3765521..c07dc9d0d3a 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -72,7 +72,7 @@ persistence = [ ] ## Enables wayland support and fixes clipboard issue. -wayland = ["egui-winit/wayland", "egui-wgpu?/wayland", "egui_glow?/wayland"] +wayland = ["egui-winit/wayland", "egui-wgpu?/wayland", "egui_glow?/wayland", "glutin?/wayland", "glutin-winit?/wayland"] ## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web. ## @@ -98,7 +98,7 @@ web_screen_reader = [ wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"] ## Enables compiling for x11. -x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11"] +x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11", "glutin?/x11", "glutin?/glx", "glutin-winit?/x11", "glutin-winit?/glx"] ## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. ## This is used to generate images for examples. @@ -142,10 +142,8 @@ egui-wgpu = { workspace = true, optional = true, features = [ ] } # if wgpu is used, use it with winit pollster = { workspace = true, optional = true } # needed for wgpu -# we can expose these to user so that they can select which backends they want to enable to avoid compiling useless deps. -# this can be done at the same time we expose x11/wayland features of winit crate. -glutin = { workspace = true, optional = true } -glutin-winit = { workspace = true, optional = true } +glutin = { workspace = true, optional = true, default-features = false, features = ["egl", "wgl"] } +glutin-winit = { workspace = true, optional = true, default-features = false, features = ["egl", "wgl"] } home = { workspace = true, optional = true } wgpu = { workspace = true, optional = true, features = [ # Let's enable some backends so that users can use `eframe` out-of-the-box diff --git a/crates/egui_glow/Cargo.toml b/crates/egui_glow/Cargo.toml index ef2d451dd2b..7a402d4067a 100644 --- a/crates/egui_glow/Cargo.toml +++ b/crates/egui_glow/Cargo.toml @@ -74,8 +74,8 @@ wasm-bindgen.workspace = true [dev-dependencies] -glutin.workspace = true # examples/pure_glow -glutin-winit.workspace = true +glutin = { workspace = true, default-features = true } # examples/pure_glow +glutin-winit = { workspace = true, default-features = true } [[example]] name = "pure_glow" From 707f85de05610f4c5bab89c051a8d39076ded3d0 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 16 Dec 2024 19:43:32 +0100 Subject: [PATCH 2/2] Improve docs --- crates/eframe/CHANGELOG.md | 2 ++ crates/eframe/Cargo.toml | 32 +++++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/crates/eframe/CHANGELOG.md b/crates/eframe/CHANGELOG.md index 35908e33d79..cbb6cf411ca 100644 --- a/crates/eframe/CHANGELOG.md +++ b/crates/eframe/CHANGELOG.md @@ -8,6 +8,8 @@ Changes since the last release can be found at