tree: fix toplevel float extent memoization
This commit is contained in:
parent
bd3872a4ef
commit
062bcb25ee
7 changed files with 14 additions and 20 deletions
|
|
@ -1440,7 +1440,7 @@ impl ToplevelNode for ContainerNode {
|
|||
}
|
||||
}
|
||||
|
||||
fn tl_change_extents(self: Rc<Self>, rect: &Rect) {
|
||||
fn tl_change_extents_impl(self: Rc<Self>, rect: &Rect) {
|
||||
self.toplevel_data.pos.set(*rect);
|
||||
self.abs_x1.set(rect.x1());
|
||||
self.abs_y1.set(rect.y1());
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ impl ToplevelNode for PlaceholderNode {
|
|||
None
|
||||
}
|
||||
|
||||
fn tl_change_extents(self: Rc<Self>, rect: &Rect) {
|
||||
fn tl_change_extents_impl(self: Rc<Self>, rect: &Rect) {
|
||||
self.toplevel.pos.set(*rect);
|
||||
if let Some(p) = self.toplevel.parent.get() {
|
||||
p.node_child_size_changed(self.deref(), rect.width(), rect.height());
|
||||
|
|
|
|||
|
|
@ -149,9 +149,16 @@ pub trait ToplevelNode: Node {
|
|||
}
|
||||
|
||||
fn tl_change_extents(self: Rc<Self>, rect: &Rect) {
|
||||
let _ = rect;
|
||||
let data = self.tl_data();
|
||||
if data.is_floating.get() {
|
||||
data.float_width.set(rect.width());
|
||||
data.float_height.set(rect.height());
|
||||
}
|
||||
self.tl_change_extents_impl(rect)
|
||||
}
|
||||
|
||||
fn tl_change_extents_impl(self: Rc<Self>, rect: &Rect);
|
||||
|
||||
fn tl_close(self: Rc<Self>) {
|
||||
// nothing
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue