Skip to content

Commit

Permalink
Merge pull request linebender#1448 from derekdreery/clipbox_has_active
Browse files Browse the repository at this point in the history
Fix clipbox bug.
  • Loading branch information
richard-uk1 authored Dec 7, 2020
2 parents 2910008 + 535ee5e commit 6f3c076
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion druid/src/widget/clip_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<T, W: Widget<T>> ClipBox<T, W> {
impl<T: Data, W: Widget<T>> Widget<T> for ClipBox<T, W> {
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)
{
Expand Down

0 comments on commit 6f3c076

Please sign in to comment.