From 374434de8a1a90e7bcdfeb46323b9c34e7662b84 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sun, 19 May 2024 02:27:51 +0900 Subject: [PATCH] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index f58da8921f4..f939f0eaa55 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -584,21 +584,21 @@ impl GlowWinitRunning { .. } = &mut *glutin; let viewport = &viewports[&viewport_id]; - let Some(window) = viewport.window.as_ref() else { - return EventResult::Wait; - }; let Some(gl_surface) = viewport.gl_surface.as_ref() else { return EventResult::Wait; }; - let screen_size_in_pixels: [u32; 2] = window.inner_size().into(); - { frame_timer.pause(); change_gl_context(current_gl_context, gl_surface); frame_timer.resume(); } + let Some(window) = viewport.window.as_ref() else { + return EventResult::Wait; + }; + let screen_size_in_pixels: [u32; 2] = window.inner_size().into(); + self.painter .borrow() .clear(screen_size_in_pixels, clear_color);