input: avoid crash by using surface directly

A constraint always has a surface, but may not have a view - use the
surface pointer directly without trying to get it through the view.

Fixes #823

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-10-13 07:37:20 -05:00
parent 73138a1943
commit e622be7423

View File

@ -5021,7 +5021,7 @@ locked_pointer_set_cursor_position_hint(struct wl_client *client,
constraint->hint_is_pending = true;
constraint->hint_pending = weston_coord_surface_from_fixed(surface_x,
surface_y,
constraint->view->surface);
constraint->surface);
}
static void
@ -5659,7 +5659,7 @@ maybe_warp_confined_pointer(struct weston_pointer_constraint *constraint)
pixman_region32_init(&confine_region);
pixman_region32_intersect(&confine_region,
&constraint->view->surface->input,
&constraint->surface->input,
&constraint->region);
assert(pixman_region32_not_empty(&confine_region));
region_to_outline(&confine_region, &borders);