Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to winit 0.27.1 and glutin 0.29.0 #1877

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
435 changes: 293 additions & 142 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions eframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ wgpu = { version = "0.13", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
dark-light = { version = "0.2.1", optional = true }
egui-winit = { version = "0.18.0", path = "../egui-winit", default-features = false, features = ["clipboard", "links"] }
glutin = { version = "0.28.0" }
winit = "0.26.1"
glutin = { version = "0.29.0" }
winit = "0.27.1"

# optional native:
puffin = { version = "0.13", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ mod glow_integration {
native_options: &epi::NativeOptions,
app_creator: epi::AppCreator,
) {
let event_loop = EventLoop::with_user_event();
let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build();
let glow_eframe = GlowWinitApp::new(&event_loop, app_name, native_options, app_creator);

if native_options.run_and_return {
Expand Down Expand Up @@ -678,7 +678,7 @@ mod wgpu_integration {
native_options: &epi::NativeOptions,
app_creator: epi::AppCreator,
) {
let event_loop = EventLoop::with_user_event();
let event_loop = winit::event_loop::EventLoopBuilder::with_user_event().build();
let wgpu_eframe = WgpuWinitApp::new(&event_loop, app_name, native_options, app_creator);

if native_options.run_and_return {
Expand Down
2 changes: 1 addition & 1 deletion egui-wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ wgpu = "0.13"
document-features = { version = "0.2", optional = true }

pollster = { version = "0.2", optional = true }
winit = { version = "0.26", optional = true }
winit = { version = "0.27", optional = true }
2 changes: 1 addition & 1 deletion egui-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ egui = { version = "0.18.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.26.1"
winit = "0.27.1"

#! ### Optional dependencies
arboard = { version = "2.1", optional = true, default-features = false }
Expand Down
4 changes: 1 addition & 3 deletions egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ impl State {
}

fn on_mouse_wheel(&mut self, delta: winit::event::MouseScrollDelta) {
let mut delta = match delta {
let delta = match delta {
winit::event::MouseScrollDelta::LineDelta(x, y) => {
let points_per_scroll_line = 50.0; // Scroll speed decided by consensus: https://github.com/emilk/egui/issues/461
egui::vec2(x, y) * points_per_scroll_line
Expand All @@ -410,8 +410,6 @@ impl State {
}
};

delta.x *= -1.0; // Winit has inverted hscroll. Remove this line when we update winit after https://github.com/rust-windowing/winit/pull/2105 is merged and released

if self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command {
// Treat as zoom instead:
let factor = (delta.y / 200.0).exp();
Expand Down
2 changes: 1 addition & 1 deletion egui_glium/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ egui-winit = { version = "0.18.0", path = "../egui-winit", default-features = fa

ahash = "0.7"
bytemuck = "1.7"
glium = "0.31"
glium = "0.32"

#! ### Optional dependencies
## Enable this when generating docs.
Expand Down
2 changes: 1 addition & 1 deletion egui_glium/examples/native_texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use glium::glutin;

fn main() {
let event_loop = glutin::event_loop::EventLoop::with_user_event();
let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build();
let display = create_display(&event_loop);

let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop);
Expand Down
2 changes: 1 addition & 1 deletion egui_glium/examples/pure_glium.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use glium::glutin;

fn main() {
let event_loop = glutin::event_loop::EventLoop::with_user_event();
let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build();
let display = create_display(&event_loop);

let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop);
Expand Down
2 changes: 1 addition & 1 deletion egui_glow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ wasm-bindgen = { version = "0.2" }


[dev-dependencies]
glutin = "0.28.0" # examples/pure_glow
glutin = "0.29.0" # examples/pure_glow


[[example]]
Expand Down
2 changes: 1 addition & 1 deletion egui_glow/examples/pure_glow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
fn main() {
let mut clear_color = [0.1, 0.1, 0.1];

let event_loop = glutin::event_loop::EventLoop::with_user_event();
let event_loop = glutin::event_loop::EventLoopBuilder::with_user_event().build();
let (gl_window, gl) = create_display(&event_loop);
let gl = std::sync::Arc::new(gl);

Expand Down