mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 01:41:30 +00:00
properly check pixman_region32_contains_rectangle return
pixman_region32_contains_rectangle() returns pixman_region_intersection_t not a bool.
This commit is contained in:
parent
8441711990
commit
06c36f8435
|
@ -390,10 +390,11 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) {
|
||||||
pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region);
|
pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region);
|
||||||
pixman_region32_translate(&surface_opaque_box,
|
pixman_region32_translate(&surface_opaque_box,
|
||||||
sway_layer_surface->geo.x, sway_layer_surface->geo.y);
|
sway_layer_surface->geo.x, sway_layer_surface->geo.y);
|
||||||
bool contains = pixman_region32_contains_rectangle(&surface_opaque_box,
|
pixman_region_overlap_t contains =
|
||||||
&output_box);
|
pixman_region32_contains_rectangle(&surface_opaque_box, &output_box);
|
||||||
pixman_region32_fini(&surface_opaque_box);
|
pixman_region32_fini(&surface_opaque_box);
|
||||||
if (contains) {
|
|
||||||
|
if (contains == PIXMAN_REGION_IN) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue