From 7560aaee739c83f0eec77556da13542b2a92e7da Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 16 Apr 2014 14:47:06 -0400 Subject: [PATCH] pointer: Make sure to care about FFM even if the client didn't get a resource --- src/wayland/meta-wayland-pointer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 4cc349210..80c11c1b6 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -347,6 +347,12 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer, pointer->focus_surface = surface; wl_resource_add_destroy_listener (pointer->focus_surface->resource, &pointer->focus_surface_listener); + meta_window_handle_enter (pointer->focus_surface->window, + /* XXX -- can we reliably get a timestamp for setting focus? */ + clutter_get_current_event_time (), + wl_fixed_to_int (pointer->x), + wl_fixed_to_int (pointer->y)); + pointer->focus_resource = find_resource_for_surface (&pointer->resource_list, surface); if (pointer->focus_resource) { @@ -354,12 +360,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer, struct wl_display *display = wl_client_get_display (client); uint32_t serial = wl_display_next_serial (display); - meta_window_handle_enter (pointer->focus_surface->window, - /* XXX -- can we reliably get a timestamp for setting focus? */ - clutter_get_current_event_time (), - wl_fixed_to_int (pointer->x), - wl_fixed_to_int (pointer->y)); - { wl_fixed_t sx, sy;