anvil.window_map: fix bbox computation

It said max_y = y + w instead of y + h.
This commit is contained in:
Ivan Molodetskikh 2020-02-03 15:16:00 +03:00
parent 5814626dbe
commit 533a006bd1
No known key found for this signature in database
GPG Key ID: 02CE38DA47E9D691
1 changed files with 9 additions and 13 deletions

View File

@ -122,21 +122,17 @@ where
x += subdata.location.0;
y += subdata.location.1;
}
// update the bounding box
if x < min_x {
min_x = x;
}
if y < min_y {
min_y = y;
}
if x + w > max_x {
max_x = x + w;
}
if y + h > max_y {
max_y = y + w;
}
// Update the bounding box.
min_x = min_x.min(x);
min_y = min_y.min(y);
max_x = max_x.max(x + w);
max_y = max_y.max(y + h);
TraversalAction::DoChildren((x, y))
} else {
// If the parent surface is unmapped, then the child surfaces are hidden as
// well, no need to consider them here.
TraversalAction::SkipChildren
}
},