Skip to content

Commit

Permalink
fix(core): 🐛 remove unused pop_providers during layout
Browse files Browse the repository at this point in the history
  • Loading branch information
wjian23 committed Feb 11, 2025
1 parent f122527 commit def6bb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ Please only add new entries below the [Unreleased](#unreleased---releasedate) he
## [@Unreleased] - @ReleaseDate

### Features

- **core**: Add the ability to force redraw a frame. (#697 @zihadmahiuddin)
- **core**: record the visual rect after layout.(#pr @wjian23)

### Fixed

- **core**: Fix window staying empty after switching workspace (e.g. in i3wm) by doing a force redraw. (#697 @zihadmahiuddin)
- **core**: remove unused pop_providers during layout.(#pr @wjian23)

## [0.4.0-alpha.26] - 2025-02-05

Expand Down
7 changes: 2 additions & 5 deletions core/src/context/layout_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<'a> LayoutCtx<'a> {

/// Perform layout of the `child` and return its size.
pub fn perform_child_layout(&mut self, child: WidgetId, clamp: BoxClamp) -> Size {
let size = self
self
.get_calculated_size(child, clamp)
.unwrap_or_else(|| {
// The position needs to be reset, as some parent render widgets may not have
Expand All @@ -80,10 +80,7 @@ impl<'a> LayoutCtx<'a> {
self.id = id;

size
});
self.provider_ctx.pop_providers_for(self.id);

size
})
}

/// Adjust the position of the widget where it should be placed relative to
Expand Down

0 comments on commit def6bb0

Please sign in to comment.