input: fix surface jump test
There are two problems here, one is that the surface jump logic only makes sense if the view remains the same. The more important fix is that pointer coordinates are in global coordinates and we want view coordinates, so this test was always wrong and led to an xdg ping storm due to spurious focus changes. Fixes 4d141a788 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
9b7402ece9
commit
bbd707d9bc
@ -463,9 +463,10 @@ default_grab_pointer_focus(struct weston_pointer_grab *grab)
|
||||
|
||||
view = weston_compositor_pick_view(pointer->seat->compositor,
|
||||
pointer->x, pointer->y);
|
||||
if (view) {
|
||||
weston_view_to_global_fixed(view, pointer->x, pointer->y,
|
||||
&sx, &sy);
|
||||
|
||||
if (view && view == pointer->focus) {
|
||||
weston_view_from_global_fixed(view, pointer->x, pointer->y,
|
||||
&sx, &sy);
|
||||
if (pointer->sx != sx || pointer->sy != sy)
|
||||
surface_jump = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user