Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 13, 2023
1 parent 8195a82 commit fdb7499
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,11 @@ mod glow_integration {
}

impl GlowWinitRunning {
fn run_ui_and_paint(&mut self, window_id: WindowId) -> EventResult {
fn run_ui_and_paint(
&mut self,
window_id: WindowId,
focused_viewport: Option<ViewportId>,
) -> EventResult {
let Some(viewport_id) = self
.glutin_ctx
.borrow()
Expand Down Expand Up @@ -693,7 +697,7 @@ mod glow_integration {
for (viewport_id, command) in viewport_commands {
if let Some(viewport) = glutin.borrow().viewports.get(&viewport_id) {
if let Some(window) = &viewport.window {
let is_viewport_focused = self.focused_viewport == Some(viewport_id);
let is_viewport_focused = focused_viewport == Some(viewport_id);
egui_winit::process_viewport_commands(
std::iter::once(command),
window,
Expand Down Expand Up @@ -1629,7 +1633,7 @@ mod glow_integration {

fn run_ui_and_paint(&mut self, window_id: WindowId) -> EventResult {
if let Some(running) = &mut self.running {
running.run_ui_and_paint(window_id)
running.run_ui_and_paint(window_id, self.focused_viewport)
} else {
EventResult::Wait
}
Expand Down

0 comments on commit fdb7499

Please sign in to comment.