mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 11:19:17 +02:00
[region] Couple more minor bugs in rectangle merge
Also one redundant line. I think this code was never used in anger. There is a major bug in the rectangle collision code which makes this detection ad-hoc.
This commit is contained in:
parent
645452c099
commit
dc11571049
1 changed files with 1 additions and 4 deletions
|
|
@ -199,14 +199,12 @@ merge_rectangle_with_sub_list (ply_region_t *region,
|
|||
|
||||
rectangle = copy_rectangle (new_area);
|
||||
|
||||
rectangle->y = old_area->y;
|
||||
rectangle->width = old_area->x - new_area->x;
|
||||
rectangle->height = (old_area->y + old_area->height) - new_area->y;
|
||||
|
||||
merge_rectangle_with_sub_list (region, rectangle, next_node);
|
||||
|
||||
new_area->height = (new_area->y + new_area->height) - (old_area->y + old_area->height);
|
||||
new_area->width = new_area->width;
|
||||
new_area->y = old_area->y + old_area->height;
|
||||
}
|
||||
break;
|
||||
|
|
@ -241,8 +239,7 @@ merge_rectangle_with_sub_list (ply_region_t *region,
|
|||
*/
|
||||
case PLY_RECTANGLE_OVERLAP_BOTTOM_AND_SIDE_EDGES:
|
||||
{
|
||||
old_area->height = (new_area->y + new_area->height)
|
||||
- (old_area->y + old_area->height);
|
||||
old_area->height = new_area->y - old_area->y;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue