anvil.window_map: fix bbox computation
It said max_y = y + w instead of y + h.
This commit is contained in:
parent
5814626dbe
commit
533a006bd1
|
@ -122,21 +122,17 @@ where
|
||||||
x += subdata.location.0;
|
x += subdata.location.0;
|
||||||
y += subdata.location.1;
|
y += subdata.location.1;
|
||||||
}
|
}
|
||||||
// update the bounding box
|
|
||||||
if x < min_x {
|
// Update the bounding box.
|
||||||
min_x = x;
|
min_x = min_x.min(x);
|
||||||
}
|
min_y = min_y.min(y);
|
||||||
if y < min_y {
|
max_x = max_x.max(x + w);
|
||||||
min_y = y;
|
max_y = max_y.max(y + h);
|
||||||
}
|
|
||||||
if x + w > max_x {
|
|
||||||
max_x = x + w;
|
|
||||||
}
|
|
||||||
if y + h > max_y {
|
|
||||||
max_y = y + w;
|
|
||||||
}
|
|
||||||
TraversalAction::DoChildren((x, y))
|
TraversalAction::DoChildren((x, y))
|
||||||
} else {
|
} else {
|
||||||
|
// If the parent surface is unmapped, then the child surfaces are hidden as
|
||||||
|
// well, no need to consider them here.
|
||||||
TraversalAction::SkipChildren
|
TraversalAction::SkipChildren
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue