libweston/input.c: Fix weston crash with the mouse event

Fix weston crash when user click the mouse continuosly while
the video is playing.
Call weston_view_update_transform before calling
weston_coord_global_to_surface to update view->transform.dirty to 0.

Fixes #985

Tested-by: Sooyeon Kang sooyeon8979@gmail.com
Signed-off-by: Sooyeon Kang sooyeon8979@gmail.com
This commit is contained in:
kang-sooyeon 2025-01-16 14:57:32 +09:00 committed by Marius Vlad
parent eabc19bc3b
commit c77a5d386a

View file

@ -1922,6 +1922,7 @@ weston_pointer_set_focus(struct weston_pointer *pointer,
if (view) {
struct weston_coord_surface surf_pos;
weston_view_update_transform(view);
surf_pos = weston_coord_global_to_surface(view, pointer->pos);
sx = wl_fixed_from_double(surf_pos.c.x);
sy = wl_fixed_from_double(surf_pos.c.y);