From 0fa9bdb9ec99d461c743dac89de78c3118471b7b Mon Sep 17 00:00:00 2001 From: Richard Dodd Date: Mon, 7 Dec 2020 21:01:56 +0000 Subject: [PATCH 1/2] Fix clipbox bug. ClipBox should recurse events if any of its children are active, not just its immediate child. --- druid/src/widget/clip_box.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/druid/src/widget/clip_box.rs b/druid/src/widget/clip_box.rs index d7bbda7235..6e2849f9c9 100644 --- a/druid/src/widget/clip_box.rs +++ b/druid/src/widget/clip_box.rs @@ -265,7 +265,7 @@ impl> ClipBox { impl> Widget for ClipBox { fn event(&mut self, ctx: &mut EventCtx, ev: &Event, data: &mut T, env: &Env) { let viewport = ctx.size().to_rect(); - let force_event = self.child.is_hot() || self.child.is_active(); + let force_event = self.child.is_hot() || self.child.has_active(); if let Some(child_event) = ev.transform_scroll(self.viewport_origin().to_vec2(), viewport, force_event) { From 535ee5e751148989c6726544812320d09d262229 Mon Sep 17 00:00:00 2001 From: Richard Dodd Date: Mon, 7 Dec 2020 21:10:46 +0000 Subject: [PATCH 2/2] I should start adding to the changelog :). --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d34610814..5c6a52ff4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,7 @@ You can find its changes [documented below](#060---2020-06-01). ### Fixed +- `ClipBox` should forward events if any child is active, not just the immediate child. ([#1448] by [@derekdreery]) - macOS: Timers not firing during modal loop. ([#1028] by [@xStrom]) - GTK: Directory selection now properly ignores file filters. ([#957] by [@xStrom]) - GTK: Don't crash when receiving an external command while a file dialog is visible. ([#1043] by [@jneem]) @@ -126,6 +127,7 @@ You can find its changes [documented below](#060---2020-06-01). - Ensure that `LifeCycle::WidgetAdded` is the first thing a widget sees. ([#1259] by [@finnerale]) - Fix a missed call to `CloseClipboard` on Windows. ([#1410] by [@andrewhickman]) - WidgetPod: change not laid out `debug_panic` to warning ([#1441] by [@Maan2003]) + ### Visual - `TextBox` stroke remains inside its `paint_rect`. ([#1007] by [@jneem]) @@ -359,6 +361,7 @@ Last release without a changelog :( [@andrewhickman]: https://github.com/andrewhickman [@colinfruit]: https://github.com/colinfruit [@Maan2003]: https://github.com/Maan2003 +[@derekdreery]: https://github.com/derekdreery [#599]: https://github.com/linebender/druid/pull/599 [#611]: https://github.com/linebender/druid/pull/611 @@ -546,6 +549,7 @@ Last release without a changelog :( [#1433]: https://github.com/linebender/druid/pull/1433 [#1438]: https://github.com/linebender/druid/pull/1438 [#1441]: https://github.com/linebender/druid/pull/1441 +[#1448]: https://github.com/linebender/druid/pull/1448 [Unreleased]: https://github.com/linebender/druid/compare/v0.6.0...master [0.6.0]: https://github.com/linebender/druid/compare/v0.5.0...v0.6.0