input: Complain if we focus a surface with a coordinate outside it
Not all callers of weston_pointer_set_focus use weston_compositor_pick_view to get their coordinate, so let's log something if the coordinate doesn't make sense. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
e2e0a73335
commit
2995bc981d
@ -1441,6 +1441,15 @@ weston_pointer_set_focus(struct weston_pointer *pointer,
|
||||
struct wl_list *focus_resource_list;
|
||||
int refocus = 0;
|
||||
|
||||
if (view) {
|
||||
int ix = wl_fixed_to_int(sx);
|
||||
int iy = wl_fixed_to_int(sy);
|
||||
|
||||
if (!weston_view_takes_input_at_point(view, ix, iy))
|
||||
weston_log("View focused with external coordinate %d, %d\n",
|
||||
ix, iy);
|
||||
}
|
||||
|
||||
if ((!pointer->focus && view) ||
|
||||
(pointer->focus && !view) ||
|
||||
(pointer->focus && pointer->focus->surface != view->surface) ||
|
||||
|
Loading…
Reference in New Issue
Block a user