diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 3f9d0f1b6039..e3f238bfe716 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -503,8 +503,6 @@ impl<'open> Window<'open> { let area_layer_id = area.layer(); let resize_id = area_id.with("resize"); - //println!("{collapsing:?}"); - let is_expanded = with_title_bar && collapsing.is_expanded(); let possible = PossibleInteractions::new(&area, &resize, is_expanded); diff --git a/crates/egui_demo_lib/src/demo/demo_app_windows.rs b/crates/egui_demo_lib/src/demo/demo_app_windows.rs index 2c3f37c5aaa3..84b6a2064a1b 100644 --- a/crates/egui_demo_lib/src/demo/demo_app_windows.rs +++ b/crates/egui_demo_lib/src/demo/demo_app_windows.rs @@ -326,7 +326,7 @@ impl DemoWindows { self.about_window_action = Some(WindowAction::ToggleShow); } - if ui.button("Toggle expand/collapse about").clicked() { + if self.about_is_open && ui.button("Toggle expand/collapse about").clicked() { self.about_window_action = Some(WindowAction::ToggleExpand); } }