From 1ed88f60c0125988cf1d952f0dabf568bfd82a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20G=C3=B3mez?= Date: Thu, 23 Mar 2023 12:38:38 -0500 Subject: [PATCH] libweston/input: Fix assert for valid confine region MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- libweston/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/input.c b/libweston/input.c index 3e79143f7..6cd26bc34 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -4730,7 +4730,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);