desktop-shell: Use the current pointer location for grab start

0, 0 doesn't make much sense, since we're not warping the cursor.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-10-28 12:35:49 -05:00 committed by Pekka Paalanen
parent 2995bc981d
commit fe0292d272

View file

@ -303,12 +303,13 @@ shell_grab_start(struct shell_grab *grab,
shsurf->grabbed = 1;
weston_pointer_start_grab(pointer, &grab->grab);
if (shell->child.desktop_shell) {
struct weston_view *view = get_default_view(shell->grab_surface);
wl_fixed_t sx, sy;
weston_view_from_global_fixed(view, pointer->x, pointer->y, &sx, &sy);
weston_desktop_shell_send_grab_cursor(shell->child.desktop_shell,
cursor);
weston_pointer_set_focus(pointer,
get_default_view(shell->grab_surface),
wl_fixed_from_int(0),
wl_fixed_from_int(0));
weston_pointer_set_focus(pointer, view, sx, sy);
}
}