Skip to content

Commit

Permalink
Update glow_integration.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 18, 2024
1 parent 3609737 commit 0dbad8d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/eframe/src/native/glow_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,11 +644,15 @@ impl GlowWinitRunning {
let Some(viewport) = viewports.get_mut(&viewport_id) else {
return EventResult::Wait;
};

viewport.info.events.clear(); // they should have been processed
let window = viewport.window.clone().unwrap();
let gl_surface = viewport.gl_surface.as_ref().unwrap();
let egui_winit = viewport.egui_winit.as_mut().unwrap();

let (Some(egui_winit), Some(window), Some(gl_surface)) = (
&mut viewport.egui_winit,
&viewport.window.clone(),
&viewport.gl_surface,
) else {
return EventResult::Wait;
};

egui_winit.handle_platform_output(&window, platform_output);

Expand Down

0 comments on commit 0dbad8d

Please sign in to comment.