diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2019-08-19 12:20:51 +0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-20 13:27:52 +0900 |
commit | 54b448aa63488431f50077c0e1b89593668d9c14 (patch) | |
tree | 4d969119f8bd80aa4273717e91abc80e6125da7f | |
parent | input/seatop_down: add axis handler (diff) | |
download | sway-54b448aa63488431f50077c0e1b89593668d9c14.tar.gz sway-54b448aa63488431f50077c0e1b89593668d9c14.tar.zst sway-54b448aa63488431f50077c0e1b89593668d9c14.zip |
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) { | |||
360 | pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region); | 360 | pixman_region32_copy(&surface_opaque_box, &wlr_surface->opaque_region); |
361 | pixman_region32_translate(&surface_opaque_box, | 361 | pixman_region32_translate(&surface_opaque_box, |
362 | sway_layer_surface->geo.x, sway_layer_surface->geo.y); | 362 | sway_layer_surface->geo.x, sway_layer_surface->geo.y); |
363 | bool contains = pixman_region32_contains_rectangle(&surface_opaque_box, | 363 | pixman_region_overlap_t contains = |
364 | &output_box); | 364 | pixman_region32_contains_rectangle(&surface_opaque_box, &output_box); |
365 | pixman_region32_fini(&surface_opaque_box); | 365 | pixman_region32_fini(&surface_opaque_box); |
366 | if (contains) { | 366 | |
367 | if (contains == PIXMAN_REGION_IN) { | ||
367 | return true; | 368 | return true; |
368 | } | 369 | } |
369 | } | 370 | } |