diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2014-08-11 22:44:02 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-08-18 15:36:39 +0300 |
commit | 61917c84e3fcbb71da806a5e94a82916d77e18b1 (patch) | |
tree | 77a7edd1845a164ec7bc3ac7155ff35b65f40659 | |
parent | a3a5debe31f3799b5c8f7039c0f6bde63db6092e (diff) | |
download | weston-61917c84e3fcbb71da806a5e94a82916d77e18b1.tar.gz |
shell: Update focused surface pointer coordinates in popup grab
The commit 'input: Send leave and enter pair when the surface moves
under the cursor' introduced focused surface local pointer coordinates
to keep track of if a surface had been moved or transformed in a way
that the pointer posititon relative to that surface would change.
Update these coordinates also for the popup grab as otherwise every
pointer motion during a popup grab results in leave and then enter
events.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | desktop-shell/shell.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index d7560768..ec722874 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2982,6 +2982,11 @@ popup_grab_motion(struct weston_pointer_grab *grab, uint32_t time, struct wl_resource *resource; wl_fixed_t sx, sy; + if (pointer->focus) { + weston_view_from_global_fixed(pointer->focus, x, y, + &pointer->sx, &pointer->sy); + } + weston_pointer_move(pointer, x, y); wl_resource_for_each(resource, &pointer->focus_resource_list) { |