diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-08-19 12:20:51 +0300 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-08-19 12:20:51 +0300 |
| commit | 8c25d1c61731d37bc0b053c0b84e322855c94414 (patch) | |
| tree | 4d969119f8bd80aa4273717e91abc80e6125da7f | |
| parent | 9a8bc3cdb5aa822d964c2f4e33c6f013bd081b0f (diff) | |
properly check pixman_region32_contains_rectangle return
pixman_region32_contains_rectangle() returns
pixman_region_intersection_t not a bool.
| -rw-r--r-- | sway/desktop/output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 7dcc8e51..e7bdf677 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -360,10 +360,11 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) { pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region); pixman_region32_translate(&surface_opaque_box, sway_layer_surface->geo.x, sway_layer_surface->geo.y); - bool contains = pixman_region32_contains_rectangle(&surface_opaque_box, - &output_box); + pixman_region_overlap_t contains = + pixman_region32_contains_rectangle(&surface_opaque_box, &output_box); pixman_region32_fini(&surface_opaque_box); - if (contains) { + + if (contains == PIXMAN_REGION_IN) { return true; } } |
