pointer/keyboard: Put the destroy listener on the right resource

We care about when the surface is destroyed, not when the wl_pointer
slash wl_keyboard resource is destroyed.
This commit is contained in:
Jasper St. Pierre 2014-02-17 19:15:54 -05:00
parent 515dc08a97
commit b65649186d
2 changed files with 2 additions and 2 deletions

View File

@ -556,7 +556,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
wl_keyboard_send_enter (resource, serial, surface->resource,
&keyboard->keys);
}
wl_resource_add_destroy_listener (resource, &keyboard->focus_surface_listener);
wl_resource_add_destroy_listener (surface->resource, &keyboard->focus_surface_listener);
keyboard->focus_serial = serial;
meta_wayland_surface_focused_set (surface);

View File

@ -364,7 +364,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
wl_fixed_to_int (pointer->x),
wl_fixed_to_int (pointer->y));
wl_pointer_send_enter (resource, serial, surface->resource, sx, sy);
wl_resource_add_destroy_listener (resource, &pointer->focus_surface_listener);
wl_resource_add_destroy_listener (surface->resource, &pointer->focus_surface_listener);
pointer->focus_serial = serial;
}