From 4bf20ecbb4bc381cfa0b56630a1fe832a26765bb Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:54:01 +0900 Subject: [PATCH 01/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index e8fe39f9064..df60399f1f7 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -549,7 +549,7 @@ impl WgpuWinitRunning { // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(viewport) = viewports.get(&viewport.ids.parent) { if let Some(window) = viewport.window.as_ref() { - return EventResult::RepaintNext(window.id()); + return EventResult::RepaintNow(window.id()); } } return EventResult::Wait; From 83b2c2212e91a7942a8581262b1487c25960440e Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:03:31 +0900 Subject: [PATCH 02/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index be30d853ccf..e97b2ee00da 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -505,7 +505,7 @@ impl GlowWinitRunning { // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { if let Some(window) = parent_viewport.window.as_ref() { - return EventResult::RepaintNext(window.id()); + return EventResult::RepaintNow(window.id()); } } return EventResult::Wait; From 31a149e1a180e14a88464dc9d28aa3a332473a0c Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:11:59 +0900 Subject: [PATCH 03/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index df60399f1f7..14157ca762f 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -509,7 +509,7 @@ impl WgpuWinitRunning { fn run_ui_and_paint(&mut self, window_id: WindowId) -> EventResult { crate::profile_function!(); - let Some(viewport_id) = self + let Some(mut viewport_id) = self .shared .borrow() .viewport_from_window @@ -544,15 +544,15 @@ impl WgpuWinitRunning { return EventResult::Wait; }; - if viewport.viewport_ui_cb.is_none() { + let is_immediate = viewport.viewport_ui_cb.is_none(); + if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(viewport) = viewports.get(&viewport.ids.parent) { + if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { if let Some(window) = viewport.window.as_ref() { - return EventResult::RepaintNow(window.id()); + viewport_id = parent_viewport.ids.this; } } - return EventResult::Wait; } } From 7e313bbfe9d24c5234699b5702ed08ffa5360cca Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:13:14 +0900 Subject: [PATCH 04/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index e97b2ee00da..1d3c794599f 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -480,7 +480,7 @@ impl GlowWinitRunning { ) -> EventResult { crate::profile_function!(); - let Some(viewport_id) = self + let Some(mut viewport_id) = self .glutin .borrow() .viewport_from_window @@ -504,11 +504,8 @@ impl GlowWinitRunning { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { - if let Some(window) = parent_viewport.window.as_ref() { - return EventResult::RepaintNow(window.id()); - } + viewport_id = parent_viewport.ids.this; } - return EventResult::Wait; } } From c5c5e297be1dd9b0967f12f5e068dc6e4827e7f9 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:22:15 +0900 Subject: [PATCH 05/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index 14157ca762f..b3253f5c15a 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -549,9 +549,7 @@ impl WgpuWinitRunning { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { - if let Some(window) = viewport.window.as_ref() { - viewport_id = parent_viewport.ids.this; - } + viewport_id = parent_viewport.ids.this; } } } From 2142e59bdb752596fde253d70f98e44446cfe2de Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:46:13 +0900 Subject: [PATCH 06/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index b3253f5c15a..d314daa863a 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -550,6 +550,9 @@ impl WgpuWinitRunning { // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { viewport_id = parent_viewport.ids.this; + } else { + // Not actually used. + return EventResult::Wait; } } } From 2d6138c45a3b7667afcc46967d8e6f6826d44c3a Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:47:10 +0900 Subject: [PATCH 07/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 1d3c794599f..614d5aab58e 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -505,6 +505,9 @@ impl GlowWinitRunning { // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { viewport_id = parent_viewport.ids.this; + } else { + // Not actually used. + return EventResult::Wait; } } } From fcc9532eb308a6a17220d11164b54997bd1b3087 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:49:35 +0900 Subject: [PATCH 08/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 614d5aab58e..467324a943c 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -506,7 +506,7 @@ impl GlowWinitRunning { if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { viewport_id = parent_viewport.ids.this; } else { - // Not actually used. + // Not actually used. Because there is always a `Some()` value. return EventResult::Wait; } } From ff6d0dd16ed97167fb519ba139a1de9bca8e8f80 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:50:09 +0900 Subject: [PATCH 09/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index d314daa863a..05c09a03301 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -551,7 +551,7 @@ impl WgpuWinitRunning { if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { viewport_id = parent_viewport.ids.this; } else { - // Not actually used. + // Not actually used. Because there is always a `Some()` value. return EventResult::Wait; } } From 97cd476ddae2fcee18aec1091dc9fd8ff03f6364 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 20:03:23 +0900 Subject: [PATCH 10/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 467324a943c..91dedbe2bf9 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -503,7 +503,7 @@ impl GlowWinitRunning { if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { + if let Some(parent_viewport) = glutin.viewports.get(&ViewportId::ROOT) { viewport_id = parent_viewport.ids.this; } else { // Not actually used. Because there is always a `Some()` value. From 2b2fd428d7b60bc6188afc47e45c6cb7482c4024 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 20:04:20 +0900 Subject: [PATCH 11/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index 05c09a03301..cdb24e34d6d 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -548,7 +548,7 @@ impl WgpuWinitRunning { if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { + if let Some(parent_viewport) = viewports.get(&ViewportId::ROOT) { viewport_id = parent_viewport.ids.this; } else { // Not actually used. Because there is always a `Some()` value. From c308fa81f1eb88440c327757f47327d2defcc673 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 15 Feb 2024 20:59:35 +0900 Subject: [PATCH 12/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index 91dedbe2bf9..dd234de430e 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -499,6 +499,7 @@ impl GlowWinitRunning { { let glutin = self.glutin.borrow(); let viewport = &glutin.viewports[&viewport_id]; + let is_immediate = viewport.viewport_ui_cb.is_none(); if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. From 607296b4a807b6aca1294117801b7ed78d8e5a2d Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:51:27 +0900 Subject: [PATCH 13/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index dd234de430e..ea528187eef 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -504,8 +504,8 @@ impl GlowWinitRunning { if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(parent_viewport) = glutin.viewports.get(&ViewportId::ROOT) { - viewport_id = parent_viewport.ids.this; + if let Some(root_viewport) = glutin.viewports.get(&ViewportId::ROOT) { + viewport_id = root_viewport.ids.this; } else { // Not actually used. Because there is always a `Some()` value. return EventResult::Wait; From a232244cbe32c1088e9de52f83e0bc4cdccbcb04 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:52:00 +0900 Subject: [PATCH 14/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index cdb24e34d6d..22cf61795db 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -548,8 +548,8 @@ impl WgpuWinitRunning { if is_immediate && viewport_id != ViewportId::ROOT { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(parent_viewport) = viewports.get(&ViewportId::ROOT) { - viewport_id = parent_viewport.ids.this; + if let Some(root_viewport) = viewports.get(&ViewportId::ROOT) { + viewport_id = root_viewport.ids.this; } else { // Not actually used. Because there is always a `Some()` value. return EventResult::Wait; From 8f271dc0d838e6f00919ab752e6d88f97e55d8a8 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 12:21:44 +0900 Subject: [PATCH 15/19] Update winit_integration.rs --- crates/eframe/src/native/winit_integration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/eframe/src/native/winit_integration.rs b/crates/eframe/src/native/winit_integration.rs index 541253c0818..bb801b22cbf 100644 --- a/crates/eframe/src/native/winit_integration.rs +++ b/crates/eframe/src/native/winit_integration.rs @@ -102,6 +102,7 @@ pub enum EventResult { /// Queues a repaint for once the event loop handles its next redraw. Exists /// so that multiple input events can be handled in one frame. Does not /// cause any delay like `RepaintNow`. + #[allow(dead_code)] RepaintNext(WindowId), RepaintAt(WindowId, Instant), From e50e244840d69630b7f97b029c9eb21b10c1e89f Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:50:13 +0900 Subject: [PATCH 16/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 47 +++++++++++--------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index 22cf61795db..0d5e5c2e6da 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -539,24 +539,37 @@ impl WgpuWinitRunning { viewports, painter, .. } = &mut *shared_lock; - if viewport_id != ViewportId::ROOT { - let Some(viewport) = viewports.get(&viewport_id) else { - return EventResult::Wait; - }; + // if viewport_id != ViewportId::ROOT { + let Some(viewport) = viewports.get(&viewport_id) else { + return EventResult::Wait; + }; + + let mut is_change_to_root = false; + let is_immediate = viewport.viewport_ui_cb.is_none(); + + if is_immediate && viewport_id != ViewportId::ROOT { + is_change_to_root = true; - let is_immediate = viewport.viewport_ui_cb.is_none(); - if is_immediate && viewport_id != ViewportId::ROOT { - // This will only happen if this is an immediate viewport. - // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. - if let Some(root_viewport) = viewports.get(&ViewportId::ROOT) { - viewport_id = root_viewport.ids.this; - } else { - // Not actually used. Because there is always a `Some()` value. - return EventResult::Wait; + if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) { + let is_differed_parent = parent_viewport.viewport_ui_cb.is_some(); + if is_differed_parent { + is_change_to_root = false; + viewport_id = parent_viewport.ids.this; } } } + if is_change_to_root { + // This will only happen if this is an immediate viewport. + // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. + if let Some(root_viewport) = viewports.get(&ViewportId::ROOT) { + viewport_id = root_viewport.ids.this; + } else { + // Not actually used. Because there is always a `Some()` value. + return EventResult::Wait; + } + } + let Some(viewport) = viewports.get_mut(&viewport_id) else { return EventResult::Wait; }; @@ -733,7 +746,6 @@ impl WgpuWinitRunning { // to resizes anyway, as doing so avoids dropping frames. // // See: https://github.com/emilk/egui/issues/903 - let mut repaint_asap = false; match event { winit::event::WindowEvent::Focused(new_focused) => { @@ -750,7 +762,6 @@ impl WgpuWinitRunning { NonZeroU32::new(physical_size.width), NonZeroU32::new(physical_size.height), ) { - repaint_asap = true; shared.painter.on_window_resized(viewport_id, width, height); } } @@ -798,11 +809,7 @@ impl WgpuWinitRunning { if integration.should_close() { EventResult::Exit } else if event_response.repaint { - if repaint_asap { - EventResult::RepaintNow(window_id) - } else { - EventResult::RepaintNext(window_id) - } + EventResult::RepaintNow(window_id) } else { EventResult::Wait } From d288fd04a5f8fc9ae80b81d53ef1ea7dc835b52c Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:50:52 +0900 Subject: [PATCH 17/19] Update glow_integration.rs --- crates/eframe/src/native/glow_integration.rs | 30 ++++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/crates/eframe/src/native/glow_integration.rs b/crates/eframe/src/native/glow_integration.rs index ea528187eef..57231b88d7d 100644 --- a/crates/eframe/src/native/glow_integration.rs +++ b/crates/eframe/src/native/glow_integration.rs @@ -496,12 +496,27 @@ impl GlowWinitRunning { let mut frame_timer = crate::stopwatch::Stopwatch::new(); frame_timer.start(); - { - let glutin = self.glutin.borrow(); + let (raw_input, viewport_ui_cb) = { + crate::profile_scope!("Prepare"); + let mut glutin = self.glutin.borrow_mut(); let viewport = &glutin.viewports[&viewport_id]; + let mut is_change_to_root = false; let is_immediate = viewport.viewport_ui_cb.is_none(); + if is_immediate && viewport_id != ViewportId::ROOT { + is_change_to_root = true; + + if let Some(parent_viewport) = glutin.viewports.get(&viewport.ids.parent) { + let is_differed_parent = parent_viewport.viewport_ui_cb.is_some(); + if is_differed_parent { + is_change_to_root = false; + viewport_id = parent_viewport.ids.this; + } + } + } + + if is_change_to_root { // This will only happen if this is an immediate viewport. // That means that the viewport cannot be rendered by itself and needs his parent to be rendered. if let Some(root_viewport) = glutin.viewports.get(&ViewportId::ROOT) { @@ -511,10 +526,7 @@ impl GlowWinitRunning { return EventResult::Wait; } } - } - let (raw_input, viewport_ui_cb) = { - let mut glutin = self.glutin.borrow_mut(); let egui_ctx = glutin.egui_ctx.clone(); let viewport = glutin.viewports.get_mut(&viewport_id).unwrap(); let Some(window) = viewport.window.as_ref() else { @@ -716,7 +728,6 @@ impl GlowWinitRunning { // to resizes anyway, as doing so avoids dropping frames. // // See: https://github.com/emilk/egui/issues/903 - let mut repaint_asap = false; match event { winit::event::WindowEvent::Focused(new_focused) => { @@ -729,7 +740,6 @@ impl GlowWinitRunning { // This solves an issue where the app would panic when minimizing on Windows. if 0 < physical_size.width && 0 < physical_size.height { if let Some(viewport_id) = viewport_id { - repaint_asap = true; glutin.resize(viewport_id, *physical_size); } } @@ -787,11 +797,7 @@ impl GlowWinitRunning { } if event_response.repaint { - if repaint_asap { - EventResult::RepaintNow(window_id) - } else { - EventResult::RepaintNext(window_id) - } + EventResult::RepaintNow(window_id) } else { EventResult::Wait } From 67341817b850cd94de012893ba35c42033fb2ba0 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:59:58 +0900 Subject: [PATCH 18/19] Update wgpu_integration.rs --- crates/eframe/src/native/wgpu_integration.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/eframe/src/native/wgpu_integration.rs b/crates/eframe/src/native/wgpu_integration.rs index 0d5e5c2e6da..a8c5f72c399 100644 --- a/crates/eframe/src/native/wgpu_integration.rs +++ b/crates/eframe/src/native/wgpu_integration.rs @@ -539,7 +539,6 @@ impl WgpuWinitRunning { viewports, painter, .. } = &mut *shared_lock; - // if viewport_id != ViewportId::ROOT { let Some(viewport) = viewports.get(&viewport_id) else { return EventResult::Wait; }; From 1fe23621413b79f6933d39fed061f6dff45063ab Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:55:06 +0900 Subject: [PATCH 19/19] Update winit_integration.rs --- crates/eframe/src/native/winit_integration.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/eframe/src/native/winit_integration.rs b/crates/eframe/src/native/winit_integration.rs index bb801b22cbf..541253c0818 100644 --- a/crates/eframe/src/native/winit_integration.rs +++ b/crates/eframe/src/native/winit_integration.rs @@ -102,7 +102,6 @@ pub enum EventResult { /// Queues a repaint for once the event loop handles its next redraw. Exists /// so that multiple input events can be handled in one frame. Does not /// cause any delay like `RepaintNow`. - #[allow(dead_code)] RepaintNext(WindowId), RepaintAt(WindowId, Instant),