From e6e1463062c8eec19be22f3727fb01c945c711be Mon Sep 17 00:00:00 2001 From: Konkitoman Date: Sun, 30 Jul 2023 22:11:49 +0300 Subject: [PATCH] Now the redraw hack introduced in "Some hacky fixes" is no more needed! This fixes other problems that was caused by that hack! --- crates/egui/src/context.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index e9b082f52..cb8f0b408 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -141,14 +141,8 @@ impl Repaint { .unwrap_or(0) > 0 { - // This is a hack, i think - // is some thing strange with the input! We need to store a state per viewport and not per context if let Some(requests) = self.repaint_requests.get_mut(&viewport_id) { - if *requests >= 2 { - *requests -= 2; - } else { - *requests -= 1; - } + *requests -= 1; } std::time::Duration::ZERO