Ignore stacking order entry ids in was_top_layer

This commit is contained in:
Julia 2024-01-19 15:26:33 -05:00
parent bfa7140034
commit b0aa05ad39

View file

@ -1088,8 +1088,16 @@ impl<'a> WindowContext<'a> {
break; break;
} }
if bounds.contains(point) && !opaque_level.starts_with(level) { if bounds.contains(point) {
return false; let starts_with = opaque_level
.iter()
.zip(level.iter())
.all(|(a, b)| a.z_index == b.z_index)
&& opaque_level.len() >= level.len();
if !starts_with {
return false;
}
} }
} }
true true