libweston/input: update view transforms when pointer is constrained

When the pointer is constrained and the surface in which it is
constrained gets committed, we may warp the pointer in some
circumstances. In order to do that, we need the associated view
transforms up-to-date. So update view transforms when this surface gets
committed.

This fixes an issue in which we'd hit an assert when trying to warp the
pointer, as we were trying to transform views with dirty transforms.

This is a leftover of d611ab24fd
"libweston: Update view transforms more often".

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2022-12-06 13:39:28 -03:00
parent ef4d2955f0
commit 7344970552

View File

@ -3915,6 +3915,9 @@ pointer_constraint_surface_committed(struct wl_listener *listener, void *data)
container_of(listener, struct weston_pointer_constraint,
surface_commit_listener);
if (is_pointer_constraint_enabled(constraint))
weston_view_update_transform(constraint->view);
if (constraint->region_is_pending) {
constraint->region_is_pending = false;
pixman_region32_copy(&constraint->region,