Skip to content

Commit cfc341f

Browse files
authored
Revert "Revert "forward x11 and wayland features to glutin" (#5391)" (#5490)
* #5391 * #5488 * #5490
1 parent adfc0be commit cfc341f

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ criterion = { version = "0.5.1", default-features = false }
7878
dify = { version = "0.7", default-features = false }
7979
document-features = "0.2.10"
8080
glow = "0.16"
81-
glutin = "0.32.0"
82-
glutin-winit = "0.5.0"
81+
glutin = { version = "0.32.0", default-features = false }
82+
glutin-winit = { version = "0.5.0", default-features = false }
8383
home = "0.5.9"
8484
image = { version = "0.25", default-features = false }
8585
kittest = { version = "0.1" }

crates/eframe/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Changes since the last release can be found at <https://github.com/emilk/egui/co
88

99

1010
## 0.30.0 - 2024-12-16 - Android support
11+
NOTE: you now need to enable the `wayland` or `x11` features to get Linux support, including getting it to work on most CI systems.
12+
1113
### ⭐ Added
1214
* Support `ViewportCommand::Screenshot` on web [#5438](https://github.com/emilk/egui/pull/5438) by [@lucasmerlin](https://github.com/lucasmerlin)
1315

crates/eframe/Cargo.toml

+27-7
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ default = [
3535
"accesskit",
3636
"default_fonts",
3737
"glow",
38-
"wayland",
38+
"wayland", # Required for Linux support (including CI!)
3939
"web_screen_reader",
4040
"winit/default",
4141
"x11",
@@ -72,7 +72,15 @@ persistence = [
7272
]
7373

7474
## Enables wayland support and fixes clipboard issue.
75-
wayland = ["egui-winit/wayland", "egui-wgpu?/wayland", "egui_glow?/wayland"]
75+
##
76+
## If you are compiling for Linux (or want to test on a CI system using Linux), you should enable this feature.
77+
wayland = [
78+
"egui-winit/wayland",
79+
"egui-wgpu?/wayland",
80+
"egui_glow?/wayland",
81+
"glutin?/wayland",
82+
"glutin-winit?/wayland",
83+
]
7684

7785
## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web.
7886
##
@@ -98,7 +106,15 @@ web_screen_reader = [
98106
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]
99107

100108
## Enables compiling for x11.
101-
x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11"]
109+
x11 = [
110+
"egui-winit/x11",
111+
"egui-wgpu?/x11",
112+
"egui_glow?/x11",
113+
"glutin?/x11",
114+
"glutin?/glx",
115+
"glutin-winit?/x11",
116+
"glutin-winit?/glx",
117+
]
102118

103119
## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit.
104120
## This is used to generate images for examples.
@@ -142,10 +158,14 @@ egui-wgpu = { workspace = true, optional = true, features = [
142158
] } # if wgpu is used, use it with winit
143159
pollster = { workspace = true, optional = true } # needed for wgpu
144160

145-
# we can expose these to user so that they can select which backends they want to enable to avoid compiling useless deps.
146-
# this can be done at the same time we expose x11/wayland features of winit crate.
147-
glutin = { workspace = true, optional = true }
148-
glutin-winit = { workspace = true, optional = true }
161+
glutin = { workspace = true, optional = true, default-features = false, features = [
162+
"egl",
163+
"wgl",
164+
] }
165+
glutin-winit = { workspace = true, optional = true, default-features = false, features = [
166+
"egl",
167+
"wgl",
168+
] }
149169
home = { workspace = true, optional = true }
150170
wgpu = { workspace = true, optional = true, features = [
151171
# Let's enable some backends so that users can use `eframe` out-of-the-box

crates/egui_glow/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ wasm-bindgen.workspace = true
7474

7575

7676
[dev-dependencies]
77-
glutin.workspace = true # examples/pure_glow
78-
glutin-winit.workspace = true
77+
glutin = { workspace = true, default-features = true } # examples/pure_glow
78+
glutin-winit = { workspace = true, default-features = true }
7979

8080
[[example]]
8181
name = "pure_glow"

0 commit comments

Comments
 (0)