From 10dce1c7a6b73a8d9a3cf7c8db6a5680da0611d8 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 12 Nov 2023 16:58:35 +0100 Subject: [PATCH] Naming: `state` -> `egui_winit` --- crates/eframe/src/native/run.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index e68b54cc167..e72e8fbf32c 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -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)), @@ -2205,7 +2203,7 @@ mod wgpu_integration { viewport_maps, painter, window, - &mut state.borrow_mut(), + &mut egui_winit.borrow_mut(), event_loop, ); } @@ -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 { @@ -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