Skip to content

Commit

Permalink
WIP: Update to winit 0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Oct 23, 2023
1 parent fd75adb commit 3cab633
Show file tree
Hide file tree
Showing 10 changed files with 787 additions and 364 deletions.
690 changes: 556 additions & 134 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions crates/eframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ image = { version = "0.24", default-features = false, features = [
"png",
] } # Needed for app icon
raw-window-handle = { version = "0.5.0" }
winit = { version = "0.28.1", default-features = false }
winit = { version = "0.29.2", default-features = false, features = ["rwh_05"] }

# optional native:
directories-next = { version = "2", optional = true }
Expand All @@ -132,8 +132,8 @@ pollster = { version = "0.3", 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 = { version = "0.30", optional = true }
glutin-winit = { version = "0.3.0", optional = true }
glutin = { version = "0.31", optional = true }
glutin-winit = { version = "0.4.0", optional = true }
puffin = { version = "0.16", optional = true }
wgpu = { workspace = true, optional = true }

Expand Down
4 changes: 2 additions & 2 deletions crates/eframe/src/native/epi_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ pub fn handle_app_output(
}

if let Some(window_size) = window_size {
window.set_inner_size(
let _ = window.request_inner_size(
winit::dpi::PhysicalSize {
width: (current_pixels_per_point * window_size.x).round(),
height: (current_pixels_per_point * window_size.y).round(),
Expand Down Expand Up @@ -471,7 +471,7 @@ impl EpiIntegration {
pub fn on_event(
&mut self,
app: &mut dyn epi::App,
event: &winit::event::WindowEvent<'_>,
event: &winit::event::WindowEvent,
) -> EventResponse {
crate::profile_function!();

Expand Down
105 changes: 50 additions & 55 deletions crates/eframe/src/native/run.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/egui-wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ wgpu.workspace = true
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }

winit = { version = "0.28", default-features = false, optional = true }
winit = { version = "0.29", default-features = false, optional = true, features = ["rwh_05"] }

# Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/egui-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ egui = { version = "0.23.0", path = "../egui", default-features = false, feature
log = { version = "0.4", features = ["std"] }
raw-window-handle = "0.5.0"
web-time = { version = "0.2" } # We use web-time so we can (maybe) compile for web
winit = { version = "0.28", default-features = false }
winit = { version = "0.29", default-features = false, features = ["rwh_05"] }

#! ### Optional dependencies

Expand Down
Loading

0 comments on commit 3cab633

Please sign in to comment.