Skip to content

Commit ce522d1

Browse files
dsh0416Copilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 51776f0 commit ce522d1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

crates/gdcef/src/cef_texture/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ pub struct CefTexture {
8585
impl ITextureRect for CefTexture {
8686
fn init(base: Base<TextureRect>) -> Self {
8787
let mut texture2d_helper = CefTexture2D::new_gd();
88-
// CefTexture owns the active runtime; helper is settings-only.
88+
// Runtime App state lives inside texture2d_helper; CefTexture owns its lifecycle and ticking,
89+
// so ensure any existing runtime in the helper is shut down before this instance takes over.
8990
texture2d_helper.bind_mut().shutdown();
9091

9192
Self {

crates/gdcef/src/cef_texture/rendering.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ impl CefTexture {
8787
accel_state.popup_rd_rid = Some(new_rid);
8888
accel_state.popup_width = new_w;
8989
accel_state.popup_height = new_h;
90+
// Ensure no stale resize request remains after completing popup resize.
91+
accel_state.needs_popup_texture = None;
9092
}
9193
});
9294
}

0 commit comments

Comments
 (0)