summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Gómez <sergio.g.delreal@gmail.com>2023-03-23 12:38:38 -0500
committerMarius Vlad <marius.vlad@collabora.com>2023-05-16 11:25:42 +0300
commitae3780c850540a1e384c78fcaf3e68d4dc3e160a (patch)
tree91092246a3c8640fc85e9d035d91c5d0edd91a70
parent3e334ff6454a9312c619379c92b216baa5b40941 (diff)
libweston/input: Fix assert for valid confine region
We need only check that the region is not empty. If either the input region or the constraint region have degenerate extents, the intersection from the previous instruction will set confine_region->data to pixman_region_empty_data. Fixes: b6423e59 Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com> (cherry picked from commit 1ed88f60c0125988cf1d952f0dabf568bfd82a13)
-rw-r--r--libweston/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libweston/input.c b/libweston/input.c
index 2aa8fba7..ec25271a 100644
--- a/libweston/input.c
+++ b/libweston/input.c
@@ -4728,7 +4728,7 @@ maybe_warp_confined_pointer(struct weston_pointer_constraint *constraint)
pixman_region32_intersect(&confine_region,
&constraint->view->surface->input,
&constraint->region);
- assert(!pixman_region32_selfcheck(&confine_region));
+ assert(pixman_region32_not_empty(&confine_region));
region_to_outline(&confine_region, &borders);
pixman_region32_fini(&confine_region);