mirror of
https://github.com/labwc/labwc.git
synced 2025-11-08 13:30:00 -05:00
common/box: drop box_contains()
This commit is contained in:
parent
51844c7fc9
commit
7969aa267e
3 changed files with 2 additions and 16 deletions
|
|
@ -3,18 +3,6 @@
|
|||
#include "common/box.h"
|
||||
#include "common/macros.h"
|
||||
|
||||
bool
|
||||
box_contains(struct wlr_box *box_super, struct wlr_box *box_sub)
|
||||
{
|
||||
if (wlr_box_empty(box_super) || wlr_box_empty(box_sub)) {
|
||||
return false;
|
||||
}
|
||||
return box_super->x <= box_sub->x
|
||||
&& box_super->x + box_super->width >= box_sub->x + box_sub->width
|
||||
&& box_super->y <= box_sub->y
|
||||
&& box_super->y + box_super->height >= box_sub->y + box_sub->height;
|
||||
}
|
||||
|
||||
bool
|
||||
box_intersects(struct wlr_box *box_a, struct wlr_box *box_b)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue