Ignore invisible layers in layer_intersects

Closes: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/59
This commit is contained in:
Simon Ser 2021-08-18 13:07:23 +02:00
parent 7a06f8c597
commit b9ca919009

View file

@ -141,6 +141,10 @@ layer_intersects(struct liftoff_layer *a, struct liftoff_layer *b)
{
struct liftoff_rect ra, rb;
if (!layer_is_visible(a) || !layer_is_visible(b)) {
return false;
}
layer_get_rect(a, &ra);
layer_get_rect(b, &rb);