diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2019-08-19 12:20:51 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-08-19 12:28:40 +0300 |
commit | 06c36f8435bacefa1a7a06c475dd5fff9b7b97e0 (patch) | |
tree | 7daafa31e8e32c86f7bb11f9a97863ee67a56685 /sway/desktop | |
parent | 8441711990daadf0463b4ee697bd139e89779ef1 (diff) | |
download | sway-06c36f8435bacefa1a7a06c475dd5fff9b7b97e0.tar.xz |
properly check pixman_region32_contains_rectangle return
pixman_region32_contains_rectangle() returns
pixman_region_intersection_t not a bool.
Diffstat (limited to 'sway/desktop')
-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 1f3cc938..4bfc3b77 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -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_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; } } |