[PATCH weston 1/6] input: Use a client destroy listener for resetting the focus resource
Rob Bradford
robert.bradford at intel.com
Tue Aug 13 11:53:10 PDT 2013
From: Rob Bradford <rob at linux.intel.com>
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 68cbbc8..cc2b417 100644
--- a/src/input.c
+++ b/src/input.c
@@ -450,8 +450,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;
}
@@ -489,8 +489,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;
}
@@ -996,8 +996,8 @@ weston_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
More information about the wayland-devel
mailing list