diff options
author | Derek Foreman <derek.foreman@collabora.com> | 2022-10-28 14:06:24 -0500 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2022-11-02 10:25:15 +0000 |
commit | eed00f679ea9f6a4149e284928b31ce70698c5bb (patch) | |
tree | 5a7358b147b96d099bdae45d3bb27178df0c4dce /desktop-shell | |
parent | fe0292d272cba93b7a7b880f545aa569d66d5ce0 (diff) | |
download | weston-eed00f679ea9f6a4149e284928b31ce70698c5bb.tar.gz |
input: Don't pass surface coordinates to weston_pointer_set_focus
We're always passing pointer->x, y converted to surface coordinates, or
garbage if view is NULL. Let's just stop passing those coordinates
entirely and calculate them in the function.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 5a5c06f7..8ed57bf7 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -303,13 +303,10 @@ 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, view, sx, sy); + weston_pointer_set_focus(pointer, + get_default_view(shell->grab_surface)); } } |