Skip to content

Commit

Permalink
Naming: state -> egui_winit
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 12, 2023
1 parent df78a2d commit 10dce1c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2186,9 +2186,7 @@ mod wgpu_integration {
}

let Viewport {
window,
egui_winit: state,
..
window, egui_winit, ..
} = viewports.entry(id_pair.this).or_insert(Viewport {
window: None,
egui_winit: Rc::new(RefCell::new(None)),
Expand All @@ -2205,7 +2203,7 @@ mod wgpu_integration {
viewport_maps,
painter,
window,
&mut state.borrow_mut(),
&mut egui_winit.borrow_mut(),
event_loop,
);
}
Expand Down Expand Up @@ -2696,11 +2694,11 @@ mod wgpu_integration {
.get(&id)
.map(|w| (id, w.clone()))
}) {
if let Some(state) = &mut *viewport.egui_winit.borrow_mut() {
if let Some(egui_winit) = &mut *viewport.egui_winit.borrow_mut() {
Some(running.integration.on_event(
running.app.as_mut(),
event,
state,
egui_winit,
id,
))
} else {
Expand Down Expand Up @@ -2740,8 +2738,8 @@ mod wgpu_integration {
.get(window_id)
.and_then(|id| shared.viewports.get(id).cloned())
{
if let Some(state) = &mut *viewport.egui_winit.borrow_mut() {
state.on_accesskit_action_request(request.clone());
if let Some(egui_winit) = &mut *viewport.egui_winit.borrow_mut() {
egui_winit.on_accesskit_action_request(request.clone());
}
}
// As a form of user input, accessibility actions should
Expand Down

0 comments on commit 10dce1c

Please sign in to comment.