mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 20:28:03 +02:00
input: make sure pointer->focus is set before trusting pointer->sx,sy
We're just going to crash at weston_view_from_global_fixed() anyway if this is untrue, but we have a similar assertion elsewhere already. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
9b5a525a3d
commit
de306e4601
1 changed files with 2 additions and 0 deletions
|
|
@ -4613,6 +4613,8 @@ weston_pointer_clamp_event_to_region(struct weston_pointer *pointer,
|
|||
float new_x_f, new_y_f;
|
||||
uint32_t directions;
|
||||
|
||||
assert(pointer->focus);
|
||||
|
||||
weston_pointer_motion_to_abs(pointer, event, &x, &y);
|
||||
weston_view_from_global_fixed(pointer->focus, x, y, &sx, &sy);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue