From: Rob Bradford <[email protected]>

This is currently equivalent as there is no way for the pointer, keyboard
or touch resource to be destroyed without the client being destroyed.
This removes another place where a single resource for the focus is
assumed.
---
 src/input.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/input.c b/src/input.c
index 8757097..7e308d6 100644
--- a/src/input.c
+++ b/src/input.c
@@ -453,8 +453,8 @@ weston_pointer_set_focus(struct weston_pointer *pointer,
                }
                wl_pointer_send_enter(resource, serial, surface->resource,
                                      sx, sy);
-               wl_resource_add_destroy_listener(resource,
-                                                &pointer->focus_listener);
+               
wl_client_add_destroy_listener(wl_resource_get_client(surface->resource),
+                                              &pointer->focus_listener);
                pointer->focus_serial = serial;
        }
 
@@ -492,8 +492,8 @@ weston_keyboard_set_focus(struct weston_keyboard *keyboard,
                                           keyboard->modifiers.group);
                wl_keyboard_send_enter(resource, serial, surface->resource,
                                       &keyboard->keys);
-               wl_resource_add_destroy_listener(resource,
-                                                &keyboard->focus_listener);
+               
wl_client_add_destroy_listener(wl_resource_get_client(surface->resource),
+                                              &keyboard->focus_listener);
                keyboard->focus_serial = serial;
        }
 
@@ -999,8 +999,8 @@ touch_set_focus(struct weston_seat *seat, struct 
weston_surface *surface)
 
                seat->touch->focus = surface;
                seat->touch->focus_resource = resource;
-               wl_resource_add_destroy_listener(resource,
-                                                &seat->touch->focus_listener);
+               
wl_client_add_destroy_listener(wl_resource_get_client(surface->resource),
+                                              &seat->touch->focus_listener);
        }
 }
 
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to