From 816eb3c9931c131d2841f027a9757a22537e85ca Mon Sep 17 00:00:00 2001 From: Cliff Hudson Date: Sat, 11 Nov 2023 17:56:47 -0800 Subject: [PATCH] Port fix for rust-windowing/winit/issues/2291 --- src/platform_impl/windows/event_loop.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 6d5f9d44a5..91d044a3ec 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -2538,7 +2538,9 @@ unsafe extern "system" fn thread_event_target_callback( } } } - userdata.event_loop_runner.poll(); + if !userdata.event_loop_runner.should_buffer() { + userdata.event_loop_runner.poll(); + } 0 } _ => DefWindowProcW(window, msg, wparam, lparam),