summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2012-03-02 18:09:27 +0200
committerPekka Paalanen <ppaalanen@gmail.com>2012-03-02 18:09:27 +0200
commit70db367ccc2910e065db4b14039ebe40e13f5181 (patch)
tree48dab6c37a16c798973b2f887d239df62367ffad
parent5ee70146c60b80fec446d698d0a55dd9211b36b2 (diff)
server: fix event sending type mismatches
These were not bugs in practice, because the first (and only) field of struct wl_surface is struct wl_resource. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
-rw-r--r--src/data-device.c2
-rw-r--r--src/wayland-server.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/data-device.c b/src/data-device.c
index fc34a18..aff2177 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -201,7 +201,7 @@ drag_grab_focus(struct wl_pointer_grab *grab, uint32_t time,
offer = wl_data_source_send_offer(device->drag_data_source,
resource);
- wl_data_device_send_enter(resource, time, surface,
+ wl_data_device_send_enter(resource, time, &surface->resource,
x, y, offer);
device->drag_focus = surface;
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 4c3d2c0..899c094 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -581,14 +581,15 @@ wl_input_device_set_pointer_focus(struct wl_input_device *device,
if (device->pointer_focus_resource) {
wl_input_device_send_pointer_leave(
device->pointer_focus_resource,
- time, device->pointer_focus);
+ time, &device->pointer_focus->resource);
wl_list_remove(&device->pointer_focus_listener.link);
}
resource = find_resource_for_surface(&device->resource_list, surface);
if (resource) {
wl_input_device_send_pointer_enter(resource, time,
- surface, sx, sy);
+ &surface->resource,
+ sx, sy);
wl_list_insert(resource->destroy_listener_list.prev,
&device->pointer_focus_listener.link);
}
@@ -612,14 +613,15 @@ wl_input_device_set_keyboard_focus(struct wl_input_device *device,
if (device->keyboard_focus_resource) {
wl_input_device_send_keyboard_leave(
device->keyboard_focus_resource,
- time, device->keyboard_focus);
+ time, &device->keyboard_focus->resource);
wl_list_remove(&device->keyboard_focus_listener.link);
}
resource = find_resource_for_surface(&device->resource_list, surface);
if (resource) {
wl_input_device_send_keyboard_enter(resource, time,
- surface, &device->keys);
+ &surface->resource,
+ &device->keys);
wl_list_insert(resource->destroy_listener_list.prev,
&device->keyboard_focus_listener.link);
}